Class: Lutaml::Lml::Pipeline
- Inherits:
-
Object
- Object
- Lutaml::Lml::Pipeline
- Defined in:
- lib/lutaml/lml/pipeline.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(input, resolve: true) ⇒ Pipeline
constructor
A new instance of Pipeline.
Constructor Details
#initialize(input, resolve: true) ⇒ Pipeline
Returns a new instance of Pipeline.
13 14 15 16 |
# File 'lib/lutaml/lml/pipeline.rb', line 13 def initialize(input, resolve: true) @input = input @resolve = resolve end |
Class Method Details
.call(input, resolve: true) ⇒ Object
9 10 11 |
# File 'lib/lutaml/lml/pipeline.rb', line 9 def self.call(input, resolve: true) new(input, resolve: resolve).call end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/lutaml/lml/pipeline.rb', line 18 def call data = Preprocessor.call(@input) hash = parse_raw(data) hash = DataProcessor.process(hash) document = build_document(hash) if @resolve document = resolve_document(document) AssociationLabelResolver.new.enrich(document) end document end |