Class: Lutaml::Lml::Preprocessor

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_file) ⇒ Preprocessor

Returns a new instance of Preprocessor.



8
9
10
# File 'lib/lutaml/lml/preprocessor.rb', line 8

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

Instance Attribute Details

#input_fileObject (readonly)

Returns the value of attribute input_file.



6
7
8
# File 'lib/lutaml/lml/preprocessor.rb', line 6

def input_file
  @input_file
end

Class Method Details

.call(input_file) ⇒ Object



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

def call(input_file)
  new(input_file).call
end

Instance Method Details

#callObject



18
19
20
# File 'lib/lutaml/lml/preprocessor.rb', line 18

def call
  expand_lines(@input_file.read, @input_file.base_dir, [])
end