Class: Twig::Node::Do
Instance Attribute Summary
Attributes inherited from Base
#attributes, #lineno, #nodes, #source_context, #tag
Instance Method Summary collapse
- #compile(compiler) ⇒ Object
-
#initialize(expr, lineno) ⇒ Do
constructor
A new instance of Do.
Methods inherited from Base
#empty?, #length, #template_name, #to_s
Constructor Details
#initialize(expr, lineno) ⇒ Do
Returns a new instance of Do.
8 9 10 |
# File 'lib/twig/node/do.rb', line 8 def initialize(expr, lineno) super({ expr: }, {}, lineno) end |
Instance Method Details
#compile(compiler) ⇒ Object
12 13 14 15 16 |
# File 'lib/twig/node/do.rb', line 12 def compile(compiler) compiler. subcompile(nodes[:expr], raw: false). raw("\n") end |