Class: Pubid::Iso::Identifiers::Recommendation

Inherits:
SingleIdentifier show all
Defined in:
lib/pubid/iso/identifiers/recommendation.rb

Constant Summary collapse

TYPED_STAGES =
[
  ::Pubid::Components::TypedStage.new(
    code: :dp,
    stage_code: :np,
    type_code: :rec,
    abbr: ["DP"],
    name: "Draft Proposal",
    harmonized_stages: %w[
      00.00 00.20 00.60 00.92 00.93 00.98 00.99
      10.00 10.20 10.60 10.92 10.93 10.98 10.99
      20.00 20.20 20.60 20.92 20.93 20.98 20.99
      30.00 30.20 30.60 30.92 30.93 30.98 30.99
      40.00 40.20 40.60 40.92 40.93 40.98 40.99
    ],
  ),
  ::Pubid::Components::TypedStage.new(
    code: :rec,
    stage_code: :published,
    type_code: :rec,
    abbr: ["R"],
    name: "Recommendation",
    harmonized_stages: %w[60.00 60.60],
  ),
].freeze

Constants inherited from Pubid::Iso::Identifier

Pubid::Iso::Identifier::ISO_TYPE_MAP

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SingleIdentifier

#to_s

Methods inherited from Pubid::Iso::Identifier

build_type_map, parse

Methods inherited from Pubid::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_s, #to_supplement_s, #to_urn, #urn_supplement_type

Constructor Details

This class inherits a constructor from Pubid::Identifier

Class Method Details

.typeObject



34
35
36
# File 'lib/pubid/iso/identifiers/recommendation.rb', line 34

def self.type
  { key: :rec, title: "Recommendation", short: "R" }
end

Instance Method Details

#urn_type_codeObject

Override URN type code - Recommendation uses ‘r’ in URN (RFC 5141)



39
40
41
# File 'lib/pubid/iso/identifiers/recommendation.rb', line 39

def urn_type_code
  "r"
end