Class: JSONP3::GeExpression
- Inherits:
-
InfixExpression
- Object
- Expression
- InfixExpression
- JSONP3::GeExpression
- Defined in:
- lib/json_p3/filter.rb
Overview
A >=
expression.
Instance Attribute Summary
Attributes inherited from InfixExpression
Attributes inherited from Expression
Instance Method Summary collapse
Methods inherited from InfixExpression
Methods inherited from Expression
Constructor Details
This class inherits a constructor from JSONP3::InfixExpression
Instance Method Details
#evaluate(context) ⇒ Object
259 260 261 262 263 |
# File 'lib/json_p3/filter.rb', line 259 def evaluate(context) left = @left.evaluate(context) right = @right.evaluate(context) JSONP3.eq?(left, right) || JSONP3.lt?(right, left) end |
#to_s ⇒ Object
265 266 267 |
# File 'lib/json_p3/filter.rb', line 265 def to_s "#{@left} >= #{@right}" end |