Class: Pubid::Tgpp::Builder
- Inherits:
-
Object
- Object
- Pubid::Tgpp::Builder
- Defined in:
- lib/pubid/tgpp/builder.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(parsed_data) ⇒ Object
6 7 8 |
# File 'lib/pubid/tgpp/builder.rb', line 6 def self.build(parsed_data) new.build(parsed_data) end |
Instance Method Details
#build(data) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/pubid/tgpp/builder.rb', line 10 def build(data) identifier_class(data[:type]).new( number: data[:number].to_s, suffix: data[:suffix]&.to_s, parts: extract_part_strings(data[:parts]), release: data[:release]&.to_s, version: data[:version].to_s, ) end |