Class: Nylas::Types::IntegerType

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

Overview

Type for attributes represented as pure integers both within the API and in Ruby

Instance Method Summary collapse

Methods inherited from ValueType

#deseralize, #serialize, #serialize_for_api

Instance Method Details

#cast(value) ⇒ Object

Parameters:

  • value (Object)

    Casts the passed in object to an integer using to_i



136
137
138
139
140
# File 'lib/nylas/types.rb', line 136

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

  value.to_i
end