Class: Twig::Node::Embed

Inherits:
Include
  • Object
show all
Defined in:
lib/twig/node/embed.rb

Instance Method Summary collapse

Methods inherited from Include

#compile

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