Class: Pubid::CenCenelec::Identifiers::AdoptedEuropeanNorm
- Inherits:
-
EuropeanNorm
show all
- Defined in:
- lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb
Overview
AdoptedEuropeanNorm wraps ISO/IEC identifiers Example: “EN ISO 8601:2019” where ISO 8601:2019 is an ISO identifier object
Constant Summary
Constants inherited
from EuropeanNorm
EuropeanNorm::TYPED_STAGES
Instance Method Summary
collapse
type
#<=>
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
Instance Method Details
#date ⇒ Object
26
27
28
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 26
def date
adopted_identifier&.date if adopted_identifier&.methods&.include?(:date)
end
|
#number ⇒ Object
Delegate common methods to adopted identifier
18
19
20
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 18
def number
adopted_identifier&.number
end
|
#part ⇒ Object
34
35
36
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 34
def part
adopted_identifier&.part if adopted_identifier&.methods&.include?(:part)
end
|
#parts ⇒ Object
30
31
32
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 30
def parts
adopted_identifier&.parts if adopted_identifier&.methods&.include?(:parts)
end
|
#to_s ⇒ Object
11
12
13
14
15
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 11
def to_s
result = publisher.is_a?(Array) ? publisher.join("/") : publisher.join("/")
result += " #{adopted_identifier}" if adopted_identifier
result
end
|
#year ⇒ Object
22
23
24
|
# File 'lib/pubid/cen_cenelec/identifiers/adopted_european_norm.rb', line 22
def year
adopted_identifier&.year if adopted_identifier&.methods&.include?(:year)
end
|