Sha256: b4d19e70e722c43c49b8b6fdb465cdaaab46ca3537d0381bb122c1ac0d53f297

Contents?: true

Size: 573 Bytes

Versions: 8

Compression:

Stored size: 573 Bytes

Contents

##
# Extensions for Ruby's `NilClass` class.
class NilClass
  ##
  # Returns the SXP representation of this object.
  #
  # @return [String]
  def to_sxp(**options)
    RDF.nil.to_s
  end
end

##
# Extensions for Ruby's `FalseClass` class.
class FalseClass
  ##
  # Returns the SXP representation of this object.
  #
  # @return [String]
  def to_sxp(**options)
    'false'
  end
end

##
# Extensions for Ruby's `TrueClass` class.
class TrueClass
  ##
  # Returns the SXP representation of this object.
  #
  # @return [String]
  def to_sxp(**options)
    'true'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sparql-3.3.1 lib/sparql/algebra/sxp_extensions.rb
sparql-3.3.0 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.6 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.5 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.4 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.3 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.1 lib/sparql/algebra/sxp_extensions.rb
sparql-3.2.0 lib/sparql/algebra/sxp_extensions.rb