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.



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

def response_object
  @response_object
end

#urObject

Returns the value of attribute ur.



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

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



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

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