Sha256: 3689a2761bde2973b9de2ba4261e84dde0fd1fff9e62e7e24de93a5fbdcdb66b

Contents?: true

Size: 328 Bytes

Versions: 3

Compression:

Stored size: 328 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

3 entries across 3 versions & 1 rubygems

Version Path
microsoft_graph-0.1.3 lib/odata/types/primitive_types/double_type.rb
microsoft_graph-0.1.1 lib/odata/types/primitive_types/double_type.rb
microsoft_graph-0.1.0 lib/odata/types/primitive_types/double_type.rb