Class: Lutaml::Lml::Pipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/lml/pipeline.rb

Overview

Parse pipeline only: preprocess → parse → transform → process → build. View resolution and label enrichment are a separate, explicit post-parse step (ViewResolution) — file I/O for imports does not belong inside parsing.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Pipeline

Returns a new instance of Pipeline.



17
18
19
# File 'lib/lutaml/lml/pipeline.rb', line 17

def initialize(input)
  @input = Source.wrap(input)
end

Class Method Details

.call(input) ⇒ Object



13
14
15
# File 'lib/lutaml/lml/pipeline.rb', line 13

def self.call(input)
  new(input).call
end

Instance Method Details

#callObject



21
22
23
24
25
26
# File 'lib/lutaml/lml/pipeline.rb', line 21

def call
  data = Preprocessor.call(@input)
  hash = parse_raw(data)
  hash = DataProcessor.process(hash)
  build_document(hash)
end