Sha256: 469b43c9293635d592db5d8ab8af2395b383caf32c193caf5617d1036aa1eeef

Contents?: true

Size: 358 Bytes

Versions: 7

Compression:

Stored size: 358 Bytes

Contents

class RestModel
  module Serialization
    class Float
      def self.serialize(value)
        Float(value)
      rescue ArgumentError
        raise "value not serializable: #{value}"
      end

      def self.desserialize(value)
        Float(value)
      rescue ArgumentError
        raise "value not desserializable: #{value}"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rest_model-0.1.6 lib/rest_model/serialization/float.rb
rest_model-0.1.5 lib/rest_model/serialization/float.rb
rest_model-0.1.4 lib/rest_model/serialization/float.rb
rest_model-0.1.3 lib/rest_model/serialization/float.rb
rest_model-0.1.2 lib/rest_model/serialization/float.rb
rest_model-0.1.1 lib/rest_model/serialization/float.rb
rest_model-0.1.0 lib/rest_model/serialization/float.rb