Class: Pubid::Bsi::Identifiers::AdoptedInternationalStandard

Inherits:
BritishStandard
  • Object
show all
Defined in:
lib/pubid/bsi/identifiers/adopted_international_standard.rb

Overview

AdoptedInternationalStandard wraps ISO/IEC identifiers directly Example: "BS ISO 8601:2019" where ISO 8601:2019 is an ISO identifier object Example: "BS IEC 62600:2020" where IEC 62600:2020 is an IEC identifier object

Constant Summary

Constants inherited from BritishStandard

BritishStandard::TYPED_STAGES

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.typeObject

Override self.type to return nil so this polymorphic wrapper is not registered as a base type. Inherits :bs from BritishStandard which would otherwise shadow it in Bsi.locate_type(:bs) auto-discovery. AdoptedInternationalStandard is constructed explicitly by the builder, not selected by type-code lookup.



24
25
26
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 24

def self.type
  nil
end

Instance Method Details

#dateObject



37
38
39
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 37

def date
  adopted_identifier&.date if adopted_identifier&.methods&.include?(:date)
end

#numberObject

Delegate common methods to adopted identifier



29
30
31
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 29

def number
  adopted_identifier&.number
end

#partObject



45
46
47
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 45

def part
  adopted_identifier&.part if adopted_identifier&.methods&.include?(:part)
end

#partsObject



41
42
43
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 41

def parts
  adopted_identifier&.parts if adopted_identifier&.methods&.include?(:parts)
end

#yearObject



33
34
35
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 33

def year
  adopted_identifier&.year if adopted_identifier&.methods&.include?(:year)
end