Class: Pubid::Gost::Builder
- Inherits:
-
Object
- Object
- Pubid::Gost::Builder
- Defined in:
- lib/pubid/gost/builder.rb
Overview
Builds a GOST identifier object from the Parslet parse tree.
Constant Summary collapse
- NUMBER_YEAR_SPLIT =
/\A(.+?)\s*[-—–]\s*(\d{2}|\d{4})\z/.freeze
- COPUBLISHER_MAP =
Cyrillic → Latin copublisher normalization. Compound forms (with /) are included.
{ "ИСО" => "ISO", "МЭК" => "IEC", "ЕН" => "EN", "ИСО/МЭК" => "ISO/IEC", "МЭК/ИСО" => "IEC/ISO", "ИСО/ТУ" => "ISO/TS", "ИСО/ТО" => "ISO/TR", "МЭК/ТУ" => "IEC/TS", "МЭК/ТО" => "IEC/TR", "ИСО/МЭК/ТУ" => "ISO/IEC/TS", }.freeze
- SUBTYPE_MAP =
Cyrillic → Latin subtype normalization.
{ "МФС" => "ISP", "ТУ" => "TS", "ТО" => "TR", }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(parsed) ⇒ Object
30 31 32 |
# File 'lib/pubid/gost/builder.rb', line 30 def self.build(parsed) new.build(parsed) end |
Instance Method Details
#build(parsed) ⇒ Object
25 26 27 28 |
# File 'lib/pubid/gost/builder.rb', line 25 def build(parsed) base = build_base(parsed) with_foreign_adoption(base, parsed) end |