class RDF::N3::Algebra::Math::LessThan
True iff the subject is a string representation of a number which is less than the number of which the object is a string representation.
Constants
- NAME
- URI
Public Instance Methods
Source
# File lib/rdf/n3/algebra/math/less_than.rb, line 37 def apply(term1, term2) RDF::Literal(term1 < term2) end
Returns TRUE if ‘term1` is less than `term2`.
@param [RDF::Term] term1
an RDF term
@param [RDF::Term] term2
an RDF term
@return [RDF::Literal::Boolean] ‘true` or `false` @raise [TypeError] if either operand is not an RDF
term or operands are not comperable
@see RDF::Term#==
Source
# File lib/rdf/n3/algebra/math/less_than.rb, line 22 def input_operand RDF::N3::List.new(values: operands) end
Both subject and object are inputs.
Source
# File lib/rdf/n3/algebra/math/less_than.rb, line 17 def resolve(resource, position:) resource.as_number if resource.term? end
Resolves inputs as numbers.
@param [RDF::Term] resource @param [:subject, :object] position @return [RDF::Term] @see RDF::N3::ResourceOperator#evaluate