Class: Liquidscript::Template
- Inherits:
-
Object
- Object
- Liquidscript::Template
- Defined in:
- lib/liquidscript/template.rb
Instance Method Summary collapse
-
#initialize(data) ⇒ Template
constructor
A new instance of Template.
- #render ⇒ Object
Constructor Details
#initialize(data) ⇒ Template
Returns a new instance of Template.
4 5 6 |
# File 'lib/liquidscript/template.rb', line 4 def initialize(data) @data = data end |
Instance Method Details
#render ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/liquidscript/template.rb', line 8 def render @_render ||= begin compiler = Compiler::ICR.new(Scanner.new(@data)) compiler.compile Generator::Javascript.new(compiler).generate end end |