Class: Pubid::Plateau::Identifiers::Handbook

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/plateau/identifiers/handbook.rb

Overview

PLATEAU Handbook Format: PLATEAU Handbook #NN [第X.Y版] Example: PLATEAU Handbook #00 第1.0版

Instance Method Summary collapse

Methods inherited from Base

#base_hash, #formatted_annex, #formatted_number, #number, #publisher

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

#==(other) ⇒ Object



26
27
28
29
30
# File 'lib/pubid/plateau/identifiers/handbook.rb', line 26

def ==(other)
  return false unless other.is_a?(Handbook)

  super && edition == other.edition
end

#formatted_editionObject



22
23
24
# File 'lib/pubid/plateau/identifiers/handbook.rb', line 22

def formatted_edition
  "#{edition}"
end

#to_sObject



16
17
18
19
20
# File 'lib/pubid/plateau/identifiers/handbook.rb', line 16

def to_s
  result = "#{publisher} #{type_string} #{formatted_number}#{formatted_annex}"
  result += " #{formatted_edition}" if edition
  result
end

#type_stringObject



12
13
14
# File 'lib/pubid/plateau/identifiers/handbook.rb', line 12

def type_string
  "Handbook"
end