Sha256: 563c9bf6aa3bccf791aa4e2ac14d10c4b699c8b2c4bbc8e44e5f39d09e284680

Contents?: true

Size: 312 Bytes

Versions: 1

Compression:

Stored size: 312 Bytes

Contents

module OData
  class DoubleType < PrimitiveType
    def valid_value?(value)
      Numeric === value
    end

    def coerce(value)
      raise TypeError.new("Cannot convert #{value.inspect} into a float") unless value.respond_to? :to_f
      value.to_f
    end

    def name
      "Edm.Double"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
microsoft_graph-0.1.2 lib/odata/types/primitive_types/double_type.rb