Class: Pubid::Bsi::Identifiers::StandaloneAmendment
- Inherits:
-
SingleIdentifier
- Object
- Lutaml::Model::Serializable
- Identifier
- SingleIdentifier
- Pubid::Bsi::Identifiers::StandaloneAmendment
- Defined in:
- lib/pubid/bsi/identifiers/standalone_amendment.rb
Overview
Standalone Amendment identifier (no base reference) Examples: “AMD 11015”, “(AMD 10971)”, “AMD Corrigendum 14716”
Constant Summary collapse
- TYPED_STAGES =
[ Pubid::Components::TypedStage.new( code: :standalone_amendment, stage_code: :published, type_code: :amendment, abbr: ["AMD"], name: "Amendment", harmonized_stages: %w[60.00 60.60], ), ].freeze
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SingleIdentifier
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
Constructor Details
This class inherits a constructor from Pubid::Identifier
Class Method Details
.type ⇒ Object
24 25 26 |
# File 'lib/pubid/bsi/identifiers/standalone_amendment.rb', line 24 def self.type { key: :standalone_amendment, title: "Amendment", short: "AMD" } end |
Instance Method Details
#to_s(lang: :en, lang_single: false) ⇒ Object
28 29 30 31 32 33 34 35 36 |
# File 'lib/pubid/bsi/identifiers/standalone_amendment.rb', line 28 def to_s(lang: :en, lang_single: false) base = if corrigendum "AMD Corrigendum #{amendment_number}" else "AMD #{amendment_number}" end parenthesized ? "(#{base})" : base end |