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
6 7 8 |
# File 'lib/liquidscript/template.rb', line 6 def initialize(data) @data = data end |
Instance Method Details
#render ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/liquidscript/template.rb', line 10 def render @_render ||= begin p Scanner.new(@data).each compiler = Compiler::ICR.new(Scanner.new(@data)) compiler.compile puts ICR::Sexp.new(compiler.top).output Generator::Javascript.new(compiler.top).generate end end |