Exception: IronCore::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/iron_core/response_error.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseError

Returns a new instance of ResponseError.



5
6
7
8
9
# File 'lib/iron_core/response_error.rb', line 5

def initialize(response)
  super(response.body)

  @response = response
end

Instance Method Details

#codeObject



11
12
13
# File 'lib/iron_core/response_error.rb', line 11

def code
  return @response.code if @response
end