Class: JsonQuery::BooleanAtom
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- JsonQuery::BooleanAtom
- Defined in:
- lib/json_query/nodes.rb
Instance Method Summary collapse
Instance Method Details
#comparator ⇒ Object
125 126 127 |
# File 'lib/json_query/nodes.rb', line 125 def comparator elements[1].comparator end |
#first ⇒ Object
129 130 131 |
# File 'lib/json_query/nodes.rb', line 129 def first elements[1].first end |
#second ⇒ Object
133 134 135 |
# File 'lib/json_query/nodes.rb', line 133 def second elements[1].second end |
#value(root, symbols, current = nil) ⇒ Object
119 120 121 122 123 |
# File 'lib/json_query/nodes.rb', line 119 def value(root, symbols, current = nil) element = elements[1] return element.boolean_expression.value(root, symbols, current) if element.respond_to?(:boolean_expression) comparator.value(first.value(root, symbols, current), second.value(root, symbols, current)) end |