Class: Pubid::Bsi::Identifiers::AdoptedInternationalStandard
- Inherits:
-
BritishStandard
- Object
- Lutaml::Model::Serializable
- Identifier
- SingleIdentifier
- BritishStandard
- Pubid::Bsi::Identifiers::AdoptedInternationalStandard
- 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
Class Method Summary collapse
-
.type ⇒ Object
Override self.type to return nil so this polymorphic wrapper is not registered as a base type.
Instance Method Summary collapse
- #date ⇒ Object
-
#number ⇒ Object
Delegate common methods to adopted identifier.
- #part ⇒ Object
- #parts ⇒ Object
- #to_s ⇒ Object
- #year ⇒ Object
Methods inherited from SingleIdentifier
Methods included from Pubid::Bsi::Identifier
Methods included from IdentifierFacade
#from_hash, #polymorphic_type_map
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
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
#date ⇒ Object
41 42 43 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 41 def date adopted_identifier&.date if adopted_identifier&.methods&.include?(:date) end |
#number ⇒ Object
Delegate common methods to adopted identifier
33 34 35 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 33 def number adopted_identifier&.number end |
#part ⇒ Object
49 50 51 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 49 def part adopted_identifier&.part if adopted_identifier&.methods&.include?(:part) end |
#parts ⇒ Object
45 46 47 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 45 def parts adopted_identifier&.parts if adopted_identifier&.methods&.include?(:parts) end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 28 def to_s render(format: :human) end |
#year ⇒ Object
37 38 39 |
# File 'lib/pubid/bsi/identifiers/adopted_international_standard.rb', line 37 def year adopted_identifier&.year if adopted_identifier&.methods&.include?(:year) end |