Sha256: d0b549313f82bad714332dc21d477d2530fe6673988a3a8f881f1479de32e912
Contents?: true
Size: 394 Bytes
Versions: 1
Compression:
Stored size: 394 Bytes
Contents
module IqRdf class Literal class Numeric < Literal def initialize(num) raise "#{num.inspect} is not a Numeric!" unless num.is_a?(::Numeric) super(num, nil, ::URI.parse(num.is_a?(Integer) ? "http://www.w3.org/2001/XMLSchema#integer" : "http://www.w3.org/2001/XMLSchema#decimal")) end def to_s(options = {}) @obj.to_s end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iq_rdf-0.2.0 | lib/iq_rdf/literal/numeric.rb |