Class: Pubid::Xsf::Builder
- Inherits:
-
Object
- Object
- Pubid::Xsf::Builder
- Defined in:
- lib/pubid/xsf/builder.rb
Overview
Builds an identifier object from the Parslet parse tree. XSF has a single concrete type, so the builder always produces an Identifiers::Xep.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.build(parsed_data) ⇒ Object
8 9 10 |
# File 'lib/pubid/xsf/builder.rb', line 8 def self.build(parsed_data) new.build(parsed_data) end |
Instance Method Details
#build(data) ⇒ Object
12 13 14 |
# File 'lib/pubid/xsf/builder.rb', line 12 def build(data) Identifiers::Xep.new(number: data[:number].to_s) end |