Class: Eyemask::Core::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/eyemask/core/converter.rb

Instance Method Summary collapse

Constructor Details

#initialize(initiaizer_options = {}) ⇒ Converter

Returns a new instance of Converter.



8
9
10
# File 'lib/eyemask/core/converter.rb', line 8

def initialize(initiaizer_options={})
  @template = ::Liquid::Template.parse(template(initiaizer_options[:template]))
end

Instance Method Details

#convert(document) ⇒ Object



12
13
14
# File 'lib/eyemask/core/converter.rb', line 12

def convert(document)
  @template.render(document, registers: document).strip
end