class SPARQL::Algebra::Operator::Triple
The SPARQL
`triple` operator.
If
the 3-tuple (term1, term2, term3) is an RDF-star triple, the function returns this triple. If
the 3-tuple is not an RDF-star triple, then the function raises an error.
Constants
- NAME
Public Instance Methods
apply(subject, predicate, object, **options)
click to toggle source
@param [RDF::Term] subject @param [RDF::Term] predicate @param [RDF::Term] object @return [RDF::URI] @raise [TypeError] if the operand is not a simple literal
# File lib/sparql/algebra/operator/triple.rb, line 20 def apply(subject, predicate, object, **options) triple = RDF::Statement(subject, predicate, object) raise TypeError, "valid components, but got #{triple.inspect}" unless triple.valid? triple end