Class: Pubid::Iec::Identifiers::VapIdentifier
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 =
{
"CSV" => "Consolidated version (with Supplements)",
"CMV" => "Compiled Maintenance Version",
"RLV" => "Redline Version (shows changes)",
"SER" => "Serial version",
}.freeze
Instance Method Summary
collapse
parse
#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
Instance Method Details
#code ⇒ Object
51
52
53
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 51
def code
base_identifier&.code
end
|
#copublishers ⇒ Object
47
48
49
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 47
def copublishers
base_identifier&.copublishers
end
|
#date ⇒ Object
59
60
61
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 59
def date
base_identifier&.date
end
|
#number ⇒ Object
55
56
57
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 55
def number
base_identifier&.number
end
|
#publisher ⇒ Object
Delegate common attributes to base_identifier
43
44
45
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 43
def publisher
base_identifier&.publisher
end
|
#stage ⇒ Object
67
68
69
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 67
def stage
base_identifier&.stage
end
|
#to_s(lang: :en, lang_single: false, with_edition: false) ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 24
def to_s(lang: :en, lang_single: false, with_edition: false)
parts = []
parts << base_identifier.to_s(lang: lang, lang_single: lang_single,
with_edition: false)
if vap_suffix
parts << " #{vap_suffix}"
end
parts << " #{edition}" if edition&.number
parts.compact.join
end
|
#type ⇒ Object
63
64
65
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 63
def type
:vap
end
|
#typed_stage ⇒ Object
71
72
73
|
# File 'lib/pubid/iec/identifiers/vap_identifier.rb', line 71
def typed_stage
base_identifier&.typed_stage
end
|