Class: Pubid::Bsi::Identifiers::ValueAddedPublication

Inherits:
SingleIdentifier show all
Defined in:
lib/pubid/bsi/identifiers/value_added_publication.rb

Overview

Value-Added Publication Identifier Wraps base identifier with format suffix (PDF, TC, BOOK) Similar to IEC VapIdentifier and BSI ExpertCommentary

Examples:

PD 5500:2018+A3:2020 PDF
PAS 96:2017 - TC
PP 7722:2006 BOOK

Instance Method Summary collapse

Methods inherited from SingleIdentifier

#<=>

Methods included from Pubid::Bsi::Identifier

parse

Methods included from IdentifierFacade

#from_hash, #polymorphic_type_map

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

Constructor Details

This class inherits a constructor from Pubid::Identifier

Instance Method Details

#dateObject



35
36
37
# File 'lib/pubid/bsi/identifiers/value_added_publication.rb', line 35

def date
  base_identifier&.date
end

#numberObject



27
28
29
# File 'lib/pubid/bsi/identifiers/value_added_publication.rb', line 27

def number
  base_identifier&.number
end

#publisherObject

Delegate common attributes to base_identifier



23
24
25
# File 'lib/pubid/bsi/identifiers/value_added_publication.rb', line 23

def publisher
  base_identifier&.publisher
end

#to_s(lang: :en, lang_single: false) ⇒ Object



18
19
20
# File 'lib/pubid/bsi/identifiers/value_added_publication.rb', line 18

def to_s(lang: :en, lang_single: false)
  render(format: :human, lang: lang, lang_single: lang_single)
end

#yearObject



31
32
33
# File 'lib/pubid/bsi/identifiers/value_added_publication.rb', line 31

def year
  base_identifier&.year
end