Class: Twig::Node::Expression::Test::Base
- Defined in:
- lib/twig/node/expression/test/base.rb
Direct Known Subclasses
Constant, Defined, DivisibleBy, Even, Iterable, Mapping, Null, Odd, SameAs, Sequence
Instance Attribute Summary
Attributes inherited from Base
#attributes, #lineno, #nodes, #source_context, #tag
Instance Method Summary collapse
-
#initialize(node, test, arguments, lineno) ⇒ Base
constructor
A new instance of Base.
Methods inherited from Call
Methods inherited from Base
#explicit_parentheses?, #set_explicit_parentheses
Methods inherited from Base
#compile, #empty?, #length, #template_name, #to_s
Constructor Details
#initialize(node, test, arguments, lineno) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/twig/node/expression/test/base.rb', line 12 def initialize(node, test, arguments, lineno) super({ node:, arguments: arguments || Node::Empty.new, }, { name: test.name, type: :test, twig_callable: test, }, lineno) end |