Method: RDF::Query::Variable#to_s
- Defined in:
- lib/rdf/query/variable.rb
#to_s ⇒ String Also known as: to_base
Returns a string representation of this variable.
Distinguished variables are indicated with a single ‘?`.
Non-distinguished variables are indicated with a double ‘??`
Existential variables are indicated using a single ‘$`, or with `$$` if also non-distinguished
290 291 292 293 |
# File 'lib/rdf/query/variable.rb', line 290 def to_s prefix = distinguished? ? (existential? ? '$' : '?') : (existential? ? '$$' : '??') unbound? ? "#{prefix}#{name}" : "#{prefix}#{name}=#{value}" end |