class SPARQL::Algebra::Operator::Object

The SPARQL `OBJECT` operator.

If triple is an RDF-star triple, the function returns the object of this triple. Passing anything other than an RDF-star triple is an error.

@see w3c.github.io/rdf-star/rdf-star-cg-spec.html#object

Constants

NAME

Public Instance Methods

apply(operand, **options) click to toggle source

Returns the object part of arg.

@param [RDF::Statement] operand

the operand

@return [RDF::Literal] @raise [TypeError] if the operand is not a statement

# File lib/sparql/algebra/operator/object.rb, line 21
def apply(operand, **options)
  raise TypeError, "expected an RDF::Statement, but got #{operand.inspect}" unless operand.is_a?(RDF::Statement)
  operand.object
end