Exception: LMC::ResponseException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/lmc/exceptions/response_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseException

Initialize a ResponseException.

Parameters:

  • response (Object)

    restclient Response



9
10
11
12
13
14
15
# File 'lib/lmc/exceptions/response_exception.rb', line 9

def initialize(response)
  if response.is_a? LMCResponse
    @response = response
  else
    @response = LMCResponse.new response
  end
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



4
5
6
# File 'lib/lmc/exceptions/response_exception.rb', line 4

def response
  @response
end

Instance Method Details

#messageObject



17
18
19
# File 'lib/lmc/exceptions/response_exception.rb', line 17

def message
  cause.message
end