Sha256: 25a50715bb612e1947e1871431fc6c15d8b1cc6afac51d81963aef95e1e30b37

Contents?: true

Size: 399 Bytes

Versions: 13

Compression:

Stored size: 399 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(parent_lang = nil)
        @obj.to_s
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
iq_rdf-0.1.17 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.16 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.15 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.14 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.13 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.12 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.10 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.8 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.7 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.6 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.5 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.4 lib/iq_rdf/literal/numeric.rb
iq_rdf-0.1.3 lib/iq_rdf/literal/numeric.rb