Class: Eyemask::Core::Converter
- Inherits:
-
Object
- Object
- Eyemask::Core::Converter
- Defined in:
- lib/eyemask/core/converter.rb
Instance Method Summary collapse
- #convert(document) ⇒ Object
-
#initialize(initiaizer_options = {}) ⇒ Converter
constructor
A new instance of Converter.
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(={}) @template = ::Liquid::Template.parse(template([: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 |