class SPARQL::Algebra::Operator::Subject
The SPARQL
`SUBJECT` operator.
Returns the subject part of `arg` as a term.
If
triple is an RDF-star triple, the function returns the subject of this triple. Passing anything other than an RDF-star triple is an error.
Constants
- NAME
Public Instance Methods
apply(operand, **options)
click to toggle source
Returns the subject 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/subject.rb, line 23 def apply(operand, **options) raise TypeError, "expected an RDF::Statement, but got #{operand.inspect}" unless operand.is_a?(RDF::Statement) operand.subject end