Class: Twig::Node::Expression::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/twig/node/expression/base.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #lineno, #nodes, #source_context, #tag

Instance Method Summary collapse

Methods inherited from Base

#compile, #initialize, #template_name

Constructor Details

This class inherits a constructor from Twig::Node::Base

Instance Method Details

#explicit_parentheses?Boolean



14
15
16
# File 'lib/twig/node/expression/base.rb', line 14

def explicit_parentheses?
  attributes.key?(:with_parentheses) && attributes[:with_parentheses]
end

#set_explicit_parenthesesExpression::Base



8
9
10
11
12
# File 'lib/twig/node/expression/base.rb', line 8

def set_explicit_parentheses
  attributes[:with_parentheses] = true

  self
end