Class: Pubid::Iso::Russian

Inherits:
Identifier show all
Defined in:
lib/pubid/iso/identifier/russian.rb

Constant Summary collapse

PUBLISHER =
{ "ISO" => "ИСО", "IEC" => "МЭК" }.freeze
STAGE =
{ "FDIS" => "ОПМС",
          "DIS" => "ПМС",
          "NP" => "НП",
          "AWI" => "АВИ",
          "CD" => "КПК",
          "PD" => "ПД",
          "FPD" => "ФПД",


}.freeze
TYPE =
{ "Guide" => "Руководство",
         "TS" => "ТС",
         "TR" => "ТО",
         "ISP" => "ИСП",
}.freeze

Constants inherited from Identifier

Identifier::LANGUAGES

Instance Attribute Summary

Attributes inherited from Identifier

#amendment, #amendment_number, #amendment_stage, #amendment_version, #corrigendum, #corrigendum_number, #corrigendum_stage, #corrigendum_version, #edition, #iteration, #joint_document, #language, #number, #part, #scnumber, #sctype, #substage, #supplements, #tcnumber, #tctype, #type, #urn_stage, #wgnumber, #wgtype, #year

Instance Method Summary collapse

Methods inherited from Identifier

#get_params, #initialize, #originator, parse, parse_from_title, #rendered_year, #to_s, #urn

Constructor Details

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

Instance Method Details

#copublisherObject



33
34
35
# File 'lib/pubid/iso/identifier/russian.rb', line 33

def copublisher
  super&.map { |copublisher| PUBLISHER[copublisher] }
end

#identifier(with_date, with_language_code) ⇒ Object



20
21
22
23
24
25
26
27
# File 'lib/pubid/iso/identifier/russian.rb', line 20

def identifier(with_date, with_language_code)
  if @type == "Guide"
    "Руководство #{originator}#{stage} #{number}#{part}#{iteration}"\
      "#{with_date && rendered_year || ''}#{edition}#{supplements}#{language(with_language_code)}"
  else
    super
  end
end

#publisherObject



29
30
31
# File 'lib/pubid/iso/identifier/russian.rb', line 29

def publisher
  PUBLISHER[@publisher]
end

#stageObject



37
38
39
# File 'lib/pubid/iso/identifier/russian.rb', line 37

def stage
  "#{(@copublisher && ' ') || '/'}#{STAGE[@stage]}" if @stage
end