Class: Twig::Node::Embed
Instance Attribute Summary
Attributes inherited from Base
#attributes, #lineno, #nodes, #source_context, #tag
Instance Method Summary collapse
-
#initialize(name, index, variables, only, ignore_missing, lineno) ⇒ Embed
constructor
we don’t inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module).
Methods inherited from Include
Methods inherited from Base
#compile, #empty?, #length, #template_name, #to_s
Constructor Details
#initialize(name, index, variables, only, ignore_missing, lineno) ⇒ Embed
we don’t inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/twig/node/embed.rb', line 10 def initialize(name, index, variables, only, ignore_missing, lineno) super( Expression::Constant.new('not_used', lineno), variables, only, ignore_missing, lineno ) attributes[:name] = name attributes[:index] = index end |