Class: Pubid::Csa::WrapperIdentifier
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Csa::WrapperIdentifier
- Defined in:
- lib/pubid/csa/wrapper_identifier.rb
Overview
WrapperIdentifier is the base class for all CSA identifiers that wrap other identifiers Examples:
- CanadianAdoptedIdentifier: CAN/{wrapped_identifier}
- CsaAdoptedIdentifier: CSA {ISO/IEC/CISPR identifier}
The wrapper pattern allows proper MODEL-DRIVEN architecture where adoptions are objects that contain other identifier objects, not string prefixes.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#wrapped_identifier ⇒ Object
The wrapped identifier (recursively parsed) Use attr_accessor since it can be any identifier object (CSA, ISO, IEC, etc.).
Instance Method Summary collapse
-
#to_s ⇒ Object
Subclasses MUST implement to_s.
Instance Attribute Details
#wrapped_identifier ⇒ Object
The wrapped identifier (recursively parsed) Use attr_accessor since it can be any identifier object (CSA, ISO, IEC, etc.)
17 18 19 |
# File 'lib/pubid/csa/wrapper_identifier.rb', line 17 def wrapped_identifier @wrapped_identifier end |
Instance Method Details
#to_s ⇒ Object
Subclasses MUST implement to_s
26 27 28 |
# File 'lib/pubid/csa/wrapper_identifier.rb', line 26 def to_s raise NotImplementedError, "Subclasses must implement to_s method" end |