Class: Pubid::Iec::Identifiers::VapIdentifier
- Inherits:
-
Pubid::Iec::Identifier
- Object
- Lutaml::Model::Serializable
- Pubid::Identifier
- Pubid::Iec::Identifier
- Pubid::Iec::Identifiers::VapIdentifier
- Includes:
- DelegatedFieldSuppression
- Defined in:
- lib/pubid/iec/identifiers/vap_identifier.rb
Overview
VAP (Version/Compilation) Identifier Single Responsibility: Wraps another identifier with VAP type suffix Examples: "IEC 61666:2010+AMD1:2021 CSV"
Constant Summary collapse
- TYPE_MAP =
VAP types mapping
{ "CSV" => "Consolidated version (with Supplements)", "CMV" => "Compiled Maintenance Version", "RLV" => "Redline Version (shows changes)", "SER" => "Serial version", }.freeze
Constants inherited from Pubid::Iec::Identifier
Pubid::Iec::Identifier::IEC_TYPE_MAP
Instance Method Summary collapse
- #base_from_kv(model, value) ⇒ Object
- #base_to_kv(model, doc) ⇒ Object
- #code ⇒ Object
- #copublishers ⇒ Object
- #date ⇒ Object
- #number ⇒ Object
-
#publisher ⇒ Object
Delegate common attributes to base.
- #stage ⇒ Object
- #typed_stage ⇒ Object
Methods included from DelegatedFieldSuppression
#copublishers_to_kv, #number_to_kv, #part_to_kv, #publisher_to_kv, #stage_iteration_to_kv, #stage_to_kv, #subpart_to_kv, #year_to_kv
Methods inherited from Pubid::Iec::Identifier
#all_parts_from_kv, #all_parts_to_kv, #build_code, build_type_map, #copublishers_from_kv, #copublishers_to_kv, #day_from_kv, #day_to_kv, default_publisher, #emit_code, #month_from_kv, #month_to_kv, #number_from_kv, #number_to_kv, parse, #part_from_kv, #part_to_kv, published_typed_stage, #publisher_from_kv, #publisher_to_kv, #stage_from_kv, #stage_iteration_from_kv, #stage_iteration_to_kv, #stage_to_kv, #subpart_from_kv, #subpart_to_kv, #type, #undated_from_kv, #undated_to_kv, #year_from_kv, #year_to_kv
Methods inherited from Pubid::Identifier
apply_mappings, #base, #base_document, concrete_class_for, #dated_version_of?, #draft_of?, #drop_supplements, #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_from_kv(model, value) ⇒ Object
33 34 35 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 33 def base_from_kv(model, value) model.base = ::Pubid::Iec::Identifier.from_hash(value) if value end |
#base_to_kv(model, doc) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 25 def base_to_kv(model, doc) base = model.base return unless base doc.add_child(Lutaml::KeyValue::DataModel::Element.new("base", base.to_hash)) end |
#code ⇒ Object
54 55 56 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 54 def code base&.code end |
#copublishers ⇒ Object
50 51 52 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 50 def copublishers base&.copublishers end |
#date ⇒ Object
62 63 64 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 62 def date base&.date end |
#number ⇒ Object
58 59 60 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 58 def number base&.number end |
#publisher ⇒ Object
Delegate common attributes to base
46 47 48 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 46 def publisher base&.publisher end |
#stage ⇒ Object
66 67 68 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 66 def stage base&.stage end |
#typed_stage ⇒ Object
70 71 72 |
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 70 def typed_stage base&.typed_stage end |