Class: Twig::Node::AutoEscape

Inherits:
Node::Base
  • Object
show all
Defined in:
lib/twig/node/auto_escape.rb

Instance Method Summary collapse

Constructor Details

#initialize(value, body, lineno) ⇒ AutoEscape

Returns a new instance of AutoEscape.

Parameters:

  • value (String, FalseClass)
  • body (Node::Base)
  • lineno (Integer)


9
10
11
# File 'lib/twig/node/auto_escape.rb', line 9

def initialize(value, body, lineno)
  super({ body: }, { value: }, lineno)
end

Instance Method Details

#compile(compiler) ⇒ Object



13
14
15
# File 'lib/twig/node/auto_escape.rb', line 13

def compile(compiler)
  compiler.subcompile(nodes[:body])
end