Method: RDF::URI#==
- Defined in:
- lib/rdf/model/uri.rb
#==(other) ⇒ Boolean
Checks whether this URI is equal to other (type checking).
Per SPARQL data-r2/expr-equal/eq-2-2, numeric can't be compared with other types
779 780 781 782 783 784 785 786 787 788 |
# File 'lib/rdf/model/uri.rb', line 779 def ==(other) case other when Literal # If other is a Literal, reverse test to consolodate complex type checking logic other == self when String then to_s == other when URI then hash == other.hash && to_s == other.to_s else other.respond_to?(:to_uri) && to_s == other.to_uri.to_s end end |