Method: RDF::Query::Variable#bind
- Defined in:
- lib/rdf/query/variable.rb
#bind(value) ⇒ self #bind(value) ⇒ RDF::Term Also known as: bind!
Rebinds this variable to the given ‘value`.
181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/rdf/query/variable.rb', line 181 def bind(value) if value.is_a?(RDF::Query::Solution) self.value = value.to_h.fetch(name, self.value) self else warn "[DEPRECATION] RDF::Query::Variable#bind should be used with a solution, not a term.\n" + "Called from #{Gem.location_of_caller.join(':')}" old_value = self.value self.value = value old_value end end |