lib/sxp/extensions.rb in sxp-0.0.13 vs lib/sxp/extensions.rb in sxp-0.0.14

- old
+ new

@@ -1,5 +1,7 @@ +require 'rdf' + ## # Extensions for Ruby's `Symbol` class. class Symbol ## # Returns `true` if this is a keyword symbol. @@ -7,5 +9,14 @@ # @return [Boolean] def keyword? to_s[-1] == ?: end end + +## +# Extensions for RDF::URI +class RDF::URI + # Original lexical value of this URI to allow for round-trip serialization. + def lexical=(value); @lexical = value; end + def lexical; @lexical; end +end +