Exception: Scorpio::HTTPError

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#response_objectObject

Returns the value of attribute response_object.



41
42
43
# File 'lib/scorpio.rb', line 41

def response_object
  @response_object
end

#urObject

Returns the value of attribute ur.



41
42
43
# File 'lib/scorpio.rb', line 41

def ur
  @ur
end

Class Method Details

.status(status = nil) ⇒ Integer

for HTTPError subclasses representing a single status, sets and/or returns the represented status.

Parameters:

  • status (Integer) (defaults to: nil)

    if specified, sets the HTTP status the class represents

Returns:

  • (Integer)

    the HTTP status the class represents



33
34
35
36
37
38
39
40
# File 'lib/scorpio.rb', line 33

def self.status(status = nil)
  if status
    @status = status
    Scorpio.error_classes_by_status[status] = self
  else
    @status
  end
end