Class: RDF::N3::Algebra::Log::OutputString
- Inherits:
-
ResourceOperator
- Object
- SPARQL::Algebra::Operator::Binary
- ResourceOperator
- RDF::N3::Algebra::Log::OutputString
- Defined in:
- lib/rdf/n3/algebra/log/output_string.rb
Overview
The subject is a key and the object is a string, where the strings are to be output in the order of the keys.
Constant Summary collapse
Instance Attribute Summary
Attributes included from Enumerable
Instance Method Summary collapse
-
#apply(term1, term2) ⇒ RDF::Literal::Boolean
Returns
term2
, but addsterm2
as an output keyed onterm1
. -
#input_operand ⇒ Object
Both subject and object are inputs.
-
#resolve(resource, position:) ⇒ RDF::Term
Resolves inputs as strings.
Methods inherited from ResourceOperator
#as_literal, #execute, #valid?
Methods included from Builtin
#each, #evaluate, #hash, #rank, #to_uri
Instance Method Details
#apply(term1, term2) ⇒ RDF::Literal::Boolean
Returns term2
, but adds term2
as an output keyed on term1
.
30 31 32 33 |
# File 'lib/rdf/n3/algebra/log/output_string.rb', line 30 def apply(term1, term2) (@options[:strings][term1.to_s] ||= []) << term2.to_s term2 end |