Exception: Enlighten::EnlightenApiError

Inherits:
EnlightenError show all
Defined in:
lib/enlighten.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ EnlightenApiError

Returns a new instance of EnlightenApiError.


11
12
13
14
# File 'lib/enlighten.rb', line 11

def initialize(json)
    @code = json.reason.to_i if json.reason.to_i
    super((json.message && json.message.join('; ')) || json.reason)
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.


10
11
12
# File 'lib/enlighten.rb', line 10

def code
  @code
end