Class: SPARQL::Algebra::Operator::GreaterThan
- Defined in:
- lib/sparql/algebra/operator/greater_than.rb
Overview
The SPARQL relational > (greater than) comparison operator.
[114] RelationalExpression ::= NumericExpression ('>' NumericExpression)?
Constant Summary collapse
- NAME =
:>
Instance Method Summary collapse
-
#apply(left, right, **options) ⇒ RDF::Literal::Boolean
Returns
trueif the first operand is greater than the second operand; returnsfalseotherwise.
Methods inherited from Compare
Methods included from Evaluatable
#evaluate, #memoize, #replace_aggregate!, #replace_vars!
Instance Method Details
#apply(left, right, **options) ⇒ RDF::Literal::Boolean
Returns true if the first operand is greater than the second
operand; returns false otherwise.
37 38 39 |
# File 'lib/sparql/algebra/operator/greater_than.rb', line 37 def apply(left, right, **) RDF::Literal(super == RDF::Literal(1)) end |