Class: Pubid::Iso::Renderer::Guide

Inherits:
Base
  • Object
show all
Defined in:
lib/pubid/iso/renderer/guide.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

#omit_post_publisher_symbol?, #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

#render_identifier(params, opts) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/pubid/iso/renderer/guide.rb', line 5

def render_identifier(params, opts)
  if opts[:language] == :french
    "Guide %{publisher}%{stage} %{number}%{part}%{iteration}%{year}%{amendments}%{corrigendums}%{edition}" % params
  elsif opts[:language] == :russian
    "Руководство %{publisher}%{stage} %{number}%{part}%{iteration}%{year}%{amendments}%{corrigendums}%{edition}" % params
  else
    if params[:stage] && params[:stage].is_a?(Pubid::Core::TypedStage)
      "%{publisher}%{stage} %{number}%{part}%{iteration}%{year}%{amendments}%{corrigendums}%{edition}" % params
    else
      "%{publisher}%{stage} Guide %{number}%{part}%{iteration}%{year}%{amendments}%{corrigendums}%{edition}" % params
    end
  end
end