Exception: AddressFinder::RequestRejectedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/addressfinder/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, body) ⇒ RequestRejectedError

Returns a new instance of RequestRejectedError.



6
7
8
9
10
11
# File 'lib/addressfinder/errors.rb', line 6

def initialize(status, body)
  @status = status
  @body = body

  super("Request rejected with status code: #{status}\n#{body}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/addressfinder/errors.rb', line 4

def body
  @body
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/addressfinder/errors.rb', line 4

def status
  @status
end