Sha256: 8a9b096d7066e6653fa5965f8fd9a993ec3aabd8d96d41d6997dc8fe6d18a285

Contents?: true

Size: 380 Bytes

Versions: 1

Compression:

Stored size: 380 Bytes

Contents

module Hari
  class Entity
    module Serialization
      module Float

        def self.serialize(value, options = {})
          desserialize value, options
        end

        def self.desserialize(value, options = {})
          Float value
        rescue
          raise SerializationError, "#{options[:name]}:#{value} is not a float"
        end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hari-0.0.1 lib/hari/entity/serialization/float.rb