class RDF::N3::Algebra::Str::Contains
True iff the subject string contains the object string.
Constants
- NAME
- URI
Public Instance Methods
Source
# File lib/rdf/n3/algebra/str/contains.rb, line 29 def apply(left, right) RDF::Literal(left.to_s.include?(right.to_s)) end
@param [String] left
a literal
@param [String] right
a literal
@return [RDF::Literal::Boolean]
Source
# File lib/rdf/n3/algebra/str/contains.rb, line 19 def input_operand RDF::N3::List.new end
Neither subect nor object are considered inputs, and must be resolved before evaluation.
Source
# File lib/rdf/n3/algebra/str/contains.rb, line 14 def resolve(resource, position:) resource if resource.term? end
Resolves inputs as strings.
@param [RDF::Term] resource @param [:subject, :object] position @return [RDF::Literal] @see RDF::N3::ResourceOperator#evaluate