Class: Pubid::Ccsds::Identifiers::Corrigendum

Inherits:
SupplementIdentifier show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SupplementIdentifier

#<=>, #number, #publisher

Methods inherited from Base

#base_hash, #publisher, #to_urn

Class Method Details

.typeHash

Type information for this identifier class

Returns:

  • (Hash)

    Type information with key, title, and short form



19
20
21
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 19

def self.type
  { key: :cor, title: "Corrigendum", short: "Cor" }
end

Instance Method Details

#==(other) ⇒ Object



30
31
32
33
34
35
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 30

def ==(other)
  return false unless other.is_a?(Corrigendum)

  base_identifier == other.base_identifier &&
    cor_number == other.cor_number
end

#to_sObject



25
26
27
28
# File 'lib/pubid/ccsds/identifiers/corrigendum.rb', line 25

def to_s
  base_str = base_identifier.to_s
  "#{base_str} Cor. #{cor_number}"
end