Exception: Elevate::HTTP::RequestError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/elevate/http/errors.rb

Direct Known Subclasses

OfflineError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ RequestError

Returns a new instance of RequestError.



4
5
6
7
8
# File 'lib/elevate/http/errors.rb', line 4

def initialize(error)
  super(error.localizedDescription)

  @code = error.code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/elevate/http/errors.rb', line 10

def code
  @code
end