Class: Pubid::Astm::Identifiers::IsoDualPublished

Inherits:
Standard show all
Defined in:
lib/pubid/astm/identifiers/iso_dual_published.rb

Overview

IsoDualPublished represents ASTM standards that are dual-published with ISO

SEMANTIC NOTE: ISO/ASTM dual-published standards (typically 5xxxx series)

  • ASTM version: ASTM 52303-24e1 (e1 = edition 1, not “E” prefix)

  • ISO version: ISO/ASTM 52303:2024

Distinguishing feature: Starts with digit (typically 5xxxx series) These are ASTM’s version of standards jointly developed with ISO

Instance Method Summary collapse

Methods inherited from Base

parse

Methods inherited from SingleIdentifier

#publisher

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_s, #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_iso_identifierPubid::Iso::Identifier

Convert to ISO/ASTM dual-published format. Uses Pubid::Iso.build so this flavor never reaches into ISO’s internal class hierarchy.

Examples:

Convert ASTM to ISO format

astm = Pubid::Astm.parse("ASTM 52303-24e1")
iso = astm.to_iso_identifier
iso.to_s # => "ISO/ASTM 52303:2024"

Returns:



37
38
39
40
41
42
43
44
45
# File 'lib/pubid/astm/identifiers/iso_dual_published.rb', line 37

def to_iso_identifier
  Pubid::Iso.build(
    type: :is,
    publisher: "ISO",
    copublishers: ["ASTM"],
    number: code&.number,
    year: year&.to_s,
  )
end