Class: Nylas::Types::StringType

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

Overview

Type for attributes represented as pure strings 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 a string using #to_s



125
126
127
128
129
# File 'lib/nylas/types.rb', line 125

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

  value.to_s
end