Class: RDF::N3::Algebra::List::Last
- Inherits:
-
RDF::N3::Algebra::ListOperator
- Object
- SPARQL::Algebra::Operator::Binary
- RDF::N3::Algebra::ListOperator
- RDF::N3::Algebra::List::Last
- Defined in:
- lib/rdf/n3/algebra/list/last.rb
Overview
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.
The object can be calculated as a function of the list.
Constant Summary collapse
Instance Attribute Summary
Attributes included from Enumerable
Instance Method Summary collapse
-
#resolve(list) ⇒ RDF::Term
Resolves this operator using the given variable
bindings
.
Methods inherited from RDF::N3::Algebra::ListOperator
#as_literal, #execute, #input_operand, #validate
Methods included from Builtin
#each, #evaluate, #hash, #input_operand, #rank, #to_uri
Instance Method Details
#resolve(list) ⇒ RDF::Term
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.
20 21 22 |
# File 'lib/rdf/n3/algebra/list/last.rb', line 20 def resolve(list) list.last end |