Class: Pubid::Cie::Identifiers::DualPublished
- Inherits:
-
SingleIdentifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Pubid::Cie::Identifier
- SingleIdentifier
- Pubid::Cie::Identifiers::DualPublished
- Defined in:
- lib/pubid/cie/identifiers/dual_published.rb
Overview
Dual published identifier for CIE Represents CIE/IEC dual published standards Example: CIE S 009:2002/IEC 62471:2006
Instance Method Summary collapse
Methods inherited from SingleIdentifier
Methods inherited from Pubid::Cie::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
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/pubid/cie/identifiers/dual_published.rb', line 16 def to_s parts = ["CIE"] # S prefix parts << "S" if s_prefix # Code parts << code.to_s if code result = parts.join(" ") # Date if year separator = date_separator == "colon" ? ":" : "-" result += "#{separator}#{year}" end # IEC portion with slash separator result += "/IEC #{iec_identifier}" if iec_identifier result end |