Class: GreaterThanEqual
- Inherits:
-
Arity2Operators
- Object
- Operator
- Arity2Operators
- GreaterThanEqual
- Defined in:
- lib/lamep/Expressions/greater_than_equal.rb
Constant Summary
Constants inherited from Arity2Operators
Constants inherited from Operator
Instance Attribute Summary
Attributes inherited from Arity2Operators
Instance Method Summary collapse
Methods inherited from Arity2Operators
Methods inherited from Operator
exists?, factory!, operator, precedence!, register
Constructor Details
This class inherits a constructor from Arity2Operators
Instance Method Details
#evaluate(attributes = {}) ⇒ Object
8 9 10 |
# File 'lib/lamep/Expressions/greater_than_equal.rb', line 8 def evaluate(attributes={}) @left.evaluate(attributes).to_i >= @right.evaluate(attributes).to_i end |
#to_sql ⇒ Object
4 5 6 |
# File 'lib/lamep/Expressions/greater_than_equal.rb', line 4 def to_sql "(#{@left.to_sql} >= #{@right.to_sql})" end |