Class: Pubid::Ccsds::Identifiers::Corrigendum
- Inherits:
-
SupplementIdentifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Ccsds::Identifier
- SupplementIdentifier
- Pubid::Ccsds::Identifiers::Corrigendum
- Defined in:
- lib/pubid/ccsds/identifiers/corrigendum.rb
Constant Summary collapse
- TYPED_STAGES =
CCSDS Corrigendum typed stage
[ Pubid::Components::TypedStage.new( abbr: ["Cor", "Corr"], stage_code: "published", type_code: "cor", ), ].freeze
Constants inherited from Pubid::Ccsds::Identifier
Pubid::Ccsds::Identifier::CCSDS_TYPE_MAP
Class Method Summary collapse
-
.type ⇒ Hash
Type information for this identifier class.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#to_s ⇒ Object
The corrigendum sequence number is stored in the inherited ‘number` attribute (mirroring ISO), so it serializes via Base’s key_value as { _type, number: ‘1’, base: … } with no corrigendum-specific map.
Methods inherited from SupplementIdentifier
Methods inherited from Pubid::Ccsds::Identifier
Methods inherited from Identifier
#base_identifier, #eql?, #exclude, #hash, #initialize, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, #render, #resolve_urn_generator, #root, #to_mr_string, #to_supplement_s, #to_urn, #urn_supplement_type, #urn_type_code, #year
Constructor Details
This class inherits a constructor from Pubid::Identifier
Class Method Details
.type ⇒ Hash
Type information for this identifier class
19 20 21 22 |
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 19 def self.type { key: :cor, web: :corrigendum, title: "Corrigendum", short: "Cor" } end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 36 |
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 32 def ==(other) return false unless other.is_a?(Corrigendum) base_identifier == other.base_identifier && number == other.number end |
#to_s ⇒ Object
The corrigendum sequence number is stored in the inherited ‘number` attribute (mirroring ISO), so it serializes via Base’s key_value as { _type, number: ‘1’, base: … } with no corrigendum-specific map.
27 28 29 30 |
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 27 def to_s base_str = base_identifier.to_s "#{base_str} Cor. #{number}" end |