Class: Nylas::Types::FloatType

Inherits:
ValueType show all
Defined in:
lib/nylas/types.rb

Overview

Type for attributes represented as floats.

Instance Method Summary collapse

Methods inherited from ValueType

#deseralize, #serialize, #serialize_for_api

Instance Method Details

#cast(value) ⇒ Object

Parameters:

  • value (Object)

    Strictly casts the passed in value to a boolean (must be true, not “” or 1)



160
161
162
163
164
# File 'lib/nylas/types.rb', line 160

def cast(value)
  return nil if value.nil?

  value.to_f
end