Sha256: 000038168325154d91983d1b903d94e1f5d3245707d4b491e1c4822eda44289e
Contents?: true
Size: 960 Bytes
Versions: 4
Compression:
Stored size: 960 Bytes
Contents
module RDF ## # An RDF term. # # Terms can be used as subjects, predicates, objects, and contexts of # statements. # # @since 0.3.0 module Term include RDF::Value include Comparable ## # Compares `self` to `other` for sorting purposes. # # Subclasses should override this to provide a more meaningful # implementation than the default which simply performs a string # comparison based on `#to_s`. # # @abstract # @param [Object] other # @return [Integer] `-1`, `0`, or `1` def <=>(other) self.to_s <=> other.to_s end ## # Returns `true` if this term is constant. # # @return [Boolean] `true` or `false` # @see #variable? def constant? !(variable?) end ## # Returns `true` if this term is variable. # # @return [Boolean] `true` or `false` # @see #constant? def variable? false end end # Term end # RDF
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rdf-0.3.3 | lib/rdf/model/term.rb |
rdf-0.3.2 | lib/rdf/model/term.rb |
rdf-0.3.1 | lib/rdf/model/term.rb |
rdf-0.3.0 | lib/rdf/model/term.rb |