Class: RocketReach::HttpError

Inherits:
Error
  • Object
show all
Defined in:
lib/rocket_reach/error.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(err) ⇒ HttpError

Returns a new instance of HttpError.



9
10
11
12
# File 'lib/rocket_reach/error.rb', line 9

def initialize(err)
  @response = err.response if err.respond_to?(:response)
  super(err)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



7
8
9
# File 'lib/rocket_reach/error.rb', line 7

def response
  @response
end

Class Method Details

.wrap(error) ⇒ Object



14
15
16
# File 'lib/rocket_reach/error.rb', line 14

def self.wrap(error)
  new(error)
end