Class: Pubid::Iso::Renderer::UrnTc
- Inherits:
-
Urn
- Object
- Core::Renderer::Urn
- Urn
- Pubid::Iso::Renderer::UrnTc
show all
- Defined in:
- lib/pubid/iso/renderer/urn-tc.rb
Constant Summary
Constants inherited
from Urn
Pubid::Iso::Renderer::Urn::STAGES
Instance Method Summary
collapse
Methods inherited from Urn
#prerender, #render, #render_iteration, #render_part, #render_prefix, #render_stage, #render_type, #render_year
Instance Method Details
#render_identifier(params) ⇒ Object
6
7
8
|
# File 'lib/pubid/iso/renderer/urn-tc.rb', line 6
def render_identifier(params)
"urn:iso:doc:%{publisher}%{copublisher}:%{tctype}:%{tcnumber}%{sctype}%{wgtype}:%{number}" % params
end
|
#render_sctype(sctype, _opts, params) ⇒ Object
14
15
16
|
# File 'lib/pubid/iso/renderer/urn-tc.rb', line 14
def render_sctype(sctype, _opts, params)
":#{sctype.downcase}:#{params[:scnumber]}"
end
|
#render_tctype(tctype, _opts, _params) ⇒ Object
10
11
12
|
# File 'lib/pubid/iso/renderer/urn-tc.rb', line 10
def render_tctype(tctype, _opts, _params)
(tctype.is_a?(Array) && tctype.join(":") || tctype.to_s).downcase
end
|
#render_wgtype(wgtype, _opts, params) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/pubid/iso/renderer/urn-tc.rb', line 18
def render_wgtype(wgtype, _opts, params)
if params[:wgnumber]
":#{wgtype.downcase}:#{params[:wgnumber]}"
else
":#{wgtype.downcase}"
end
end
|