class RDF::N3::Algebra::List::Length
Iff the subject is a list and the object is the last thing that list, then this is true. The object can be calculated as a function of the list.
@example
{ ( 1 2 3 4 5 6 ) list:length 6 } => { :test1 a :SUCCESS }.
The object can be calculated as a function of the list.
Constants
- NAME
- URI
Public Instance Methods
resolve(list)
click to toggle source
Resolves this operator using the given variable ‘bindings`. If the last operand is a variable, it creates a solution for each element in the list.
@param [RDF::N3::List] list @return [RDF::Term] @see RDF::N3::ListOperator#evaluate
# File lib/rdf/n3/algebra/list/length.rb, line 20 def resolve(list) RDF::Literal(list.length) end