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.



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

def response_object
  @response_object
end

#urObject

Returns the value of attribute ur.



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

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



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

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