Class: Pubid::Cen::Transformer
- Inherits:
-
Parslet::Transform
- Object
- Parslet::Transform
- Pubid::Cen::Transformer
- Defined in:
- lib/pubid/cen/transformer.rb
Class Method Summary collapse
Class Method Details
.convert_supplement(supplement) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/pubid/cen/transformer.rb', line 28 def self.convert_supplement(supplement) case supplement[:type] when "A" Identifier::Amendment.new(**supplement) when "AC" Identifier::Corrigendum.new(**supplement) end end |
.convert_supplement_type(type) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/pubid/cen/transformer.rb', line 37 def self.convert_supplement_type(type) case type when "A" :amd when "AC" :cor end end |