class Gearbox::Types::Float
A {Gearbox::Type} for Float
values. Values will be associated with the ‘XSD.double` type.
A {Gearbox::Resource} property can reference this type as ‘Gearbox::Types::Float`, `Float`, `XSD.double`, or `XSD.float`.
Public Class Methods
serialize(value)
click to toggle source
# File lib/gearbox/types/float.rb, line 20 def self.serialize(value) RDF::Literal.new(value.to_f, :datatype => XSD.double) end
unserialize(value)
click to toggle source
# File lib/gearbox/types/float.rb, line 16 def self.unserialize(value) value.object.to_f end