Class: Pubid::Bsi::Identifiers::ExpertCommentary

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

Overview

Expert Commentary Identifier Wraps a base identifier with Expert Commentary suffix Three formats:

  1. “Expert Commentary” (full form)

  2. “ExComm” (abbreviated form)

  3. “ExComm (Fire)” (with optional topic suffix)

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

#numberObject



25
26
27
# File 'lib/pubid/bsi/identifiers/expert_commentary.rb', line 25

def number
  base_identifier&.number
end

#publisherObject



21
22
23
# File 'lib/pubid/bsi/identifiers/expert_commentary.rb', line 21

def publisher
  base_identifier&.publisher
end

#to_sObject



17
18
19
# File 'lib/pubid/bsi/identifiers/expert_commentary.rb', line 17

def to_s
  render(format: :human)
end

#yearObject



29
30
31
# File 'lib/pubid/bsi/identifiers/expert_commentary.rb', line 29

def year
  base_identifier&.year
end