class IEX::Errors::ClientError

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
Calls superclass method
# File lib/iex/errors/client_error.rb, line 6
def initialize(response)
  @response = response
  super error
end

Public Instance Methods

body() click to toggle source
# File lib/iex/errors/client_error.rb, line 19
def body
  response[:body]
end
error() click to toggle source
# File lib/iex/errors/client_error.rb, line 11
def error
  if body.is_a?(Hash) && body.key?('error')
    body['error']
  else
    body
  end
end