Class: Pubid::Jcgm::Identifiers::GumGuide
- Inherits:
-
SingleIdentifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Jcgm::Identifier
- SingleIdentifier
- Pubid::Jcgm::Identifiers::GumGuide
- Defined in:
- lib/pubid/jcgm/identifiers/gum_guide.rb
Constant Summary collapse
- TYPED_STAGES =
[ Pubid::Components::TypedStage.new( code: :pubgumguide, stage_code: :published, type_code: :gum_guide, abbr: [""], name: "GUM Guide", harmonized_stages: %w[60.00 60.60], ), ].freeze
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SingleIdentifier
#number_portion, #publisher_portion
Methods inherited from Pubid::Jcgm::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
Constructor Details
This class inherits a constructor from Pubid::Identifier
Class Method Details
.type ⇒ Object
21 22 23 |
# File 'lib/pubid/jcgm/identifiers/gum_guide.rb', line 21 def self.type { key: :gum_guide, title: "GUM Guide", short: "GUM" } end |
Instance Method Details
#to_s(lang: :en, lang_single: false, with_edition: false, format: nil, stage_format_long: nil, with_date: nil) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/pubid/jcgm/identifiers/gum_guide.rb', line 25 def to_s(lang: :en, lang_single: false, with_edition: false, format: nil, stage_format_long: nil, with_date: nil) parts = [] parts << publisher.publisher if publisher parts << "GUM-#{gum_number.value}" if gum_number result = parts.join(" ") result += ":#{date}" if date result += language_portion if languages&.any? result end |