Class: Pubid::Iso::Renderer::TechnicalCommittee

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/iso/renderer/technical_committee.rb

Constant Summary

Constants inherited from Base

Base::TRANSLATION, Base::TYPE

Instance Attribute Summary

Attributes inherited from Base

#prerendered_params

Instance Method Summary collapse

Methods inherited from Base

#postrender_stage, #render, #render_addendum, #render_base, #render_base_identifier, #render_copublisher_string, #render_edition, #render_iteration, #render_language, #render_part, #render_publisher, #render_stage, #render_type_prefix, #render_typed_stage, #render_year

Instance Method Details

#omit_post_publisher_symbol?(_typed_stage, _stage, _opts) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 6

def omit_post_publisher_symbol?(_typed_stage, _stage, _opts)
  # always need post publisher symbol, because we always have to add "TR"
  false
end

#render_identifier(params, opts) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 11

def render_identifier(params, opts)
  if params[:wgnumber] && !params[:wgnumber].empty?
    "%{publisher}%{tctype} %{tcnumber}%{sctype}%{scnumber}%{wgtype}%{wgnumber} %{number}" % params
  else
    "%{publisher}%{tctype} %{tcnumber}%{sctype}%{wgtype}%{scnumber} %{number}" % params
  end
end

#render_number(number, _params, _opts) ⇒ Object



27
28
29
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 27

def render_number(number, _params, _opts)
  "N#{number}"
end

#render_scnumber(scnumber, _params, _opts) ⇒ Object



43
44
45
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 43

def render_scnumber(scnumber, _params, _opts)
  " #{scnumber}"
end

#render_sctype(sctype, _params, _opts) ⇒ Object



31
32
33
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 31

def render_sctype(sctype, _params, _opts)
  "/#{sctype}"
end

#render_tctype(tctype, _params, _opts) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 19

def render_tctype(tctype, _params, _opts)
  if tctype.is_a?(Array)
    tctype.join("/")
  else
    tctype
  end
end

#render_wgnumber(wgnumber, _params, _opts) ⇒ Object



39
40
41
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 39

def render_wgnumber(wgnumber, _params, _opts)
  " #{wgnumber}"
end

#render_wgtype(wgtype, _params, _opts) ⇒ Object



35
36
37
# File 'lib/pubid/iso/renderer/technical_committee.rb', line 35

def render_wgtype(wgtype, _params, _opts)
  "/#{wgtype}"
end