Class: Pubid::Iso::Corrigendum

Inherits:
Supplement
  • Object
show all
Defined in:
lib/pubid/iso/corrigendum.rb

Instance Attribute Summary

Attributes inherited from Supplement

#edition, #iteration, #publisher, #stage

Instance Method Summary collapse

Methods inherited from Supplement

#<=>, #initialize, #render_iteration, #render_pubid_number, #render_pubid_stage, #render_urn_number, #render_urn_stage

Constructor Details

This class inherits a constructor from Pubid::Iso::Supplement

Instance Method Details

#render_pubid(stage_format_long = true, with_date = true) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/pubid/iso/corrigendum.rb', line 3

def render_pubid(stage_format_long = true, with_date = true)
  stage = render_pubid_stage
  pubid_number = render_pubid_number(with_date: with_date)
  case stage.to_s
  when "DIS"
    if stage_format_long
      "/DCor #{pubid_number}"
    else
      "/DCOR #{pubid_number}"
    end
  when "FDIS"
    if stage_format_long
      "/FDCor #{pubid_number}"
    else
      "/FDCOR #{pubid_number}"
    end
  when ""
    "/Cor #{pubid_number}"
  else
    "/#{stage} Cor #{pubid_number}"
  end
end

#render_urnObject



26
27
28
# File 'lib/pubid/iso/corrigendum.rb', line 26

def render_urn
  "#{render_urn_stage}:cor#{render_urn_number}"
end