Class: Pubid::Cie::SupplementIdentifier
- Inherits:
-
Identifier
- Object
- Lutaml::Model::Serializable
- Identifier
- Identifier
- Pubid::Cie::SupplementIdentifier
- Defined in:
- lib/pubid/cie/supplement_identifier.rb
Overview
Base class for CIE supplement identifiers (Supplement, Corrigendum).
Like ISO/IEC/BSI/JCGM, a CIE supplement wraps its base document as a nested full identifier (+base+, a Pubid::Cie::Identifier), rather than flat base_number/base_year strings. This lets CIE supplements participate in the shared base_document / drop_supplements / matches? vocabulary relaton uses to match a citation to its base standard.
Concrete subtypes: Supplement (-SPN), Corrigendum (/CorN).
Direct Known Subclasses
Instance Method Summary collapse
-
#base_document ⇒ Object
The underlying standard, with supplement layer(s) peeled recursively.
-
#drop_supplements ⇒ Object
Dropping one supplement layer yields the wrapped base identifier.
-
#supplement_number ⇒ Object
Uniform, class-agnostic supplement interface (shared by Supplement and Corrigendum) so callers never special-case corrigenda.
Methods inherited from Identifier
Methods inherited from Identifier
apply_mappings, #base, concrete_class_for, #dated_version_of?, #draft_of?, #edition_of?, #eql?, #exclude, from_hash, #has_supplement?, #hash, #includes?, #initialize, #matches?, #mr_all_parts, #mr_edition, #mr_languages, #mr_number, #mr_number_with_part, #mr_part, #mr_publisher, #mr_subpart, #mr_supplement_suffix, #mr_type, #mr_year, #new_edition_of?, polymorphic_name, polymorphic_type_map, #related_to?, #render, #resolve_urn_generator, #root, #sibling_of?, #supplement_of?, #to_hash, #to_mr_string, #to_s, #to_slug, #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
#base_document ⇒ Object
The underlying standard, with supplement layer(s) peeled recursively.
29 30 31 |
# File 'lib/pubid/cie/supplement_identifier.rb', line 29 def base_document base&.base_document || self end |
#drop_supplements ⇒ Object
Dropping one supplement layer yields the wrapped base identifier.
34 35 36 |
# File 'lib/pubid/cie/supplement_identifier.rb', line 34 def drop_supplements base || self end |
#supplement_number ⇒ Object
Uniform, class-agnostic supplement interface (shared by Supplement and
Corrigendum) so callers never special-case corrigenda. supplement_type
and supplement_year are defined per subclass.
24 25 26 |
# File 'lib/pubid/cie/supplement_identifier.rb', line 24 def supplement_number number end |