Exception: Contacts::TooManyRedirects
- Defined in:
- lib/contacts.rb
Constant Summary collapse
- MAX_REDIRECTS =
2
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ TooManyRedirects
constructor
A new instance of TooManyRedirects.
Constructor Details
#initialize(response) ⇒ TooManyRedirects
Returns a new instance of TooManyRedirects.
72 73 74 75 76 |
# File 'lib/contacts.rb', line 72 def initialize(response) @response = response @location = @response['Location'] super "exceeded maximum of #{MAX_REDIRECTS} redirects (Location: #{location})" end |
Instance Attribute Details
#location ⇒ Object (readonly)
Returns the value of attribute location.
68 69 70 |
# File 'lib/contacts.rb', line 68 def location @location end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
68 69 70 |
# File 'lib/contacts.rb', line 68 def response @response end |