Exception: GmailContacts::TooManyRedirects

Inherits:
Error
  • Object
show all
Defined in:
lib/gmail-contacts.rb

Constant Summary collapse

MAX_REDIRECTS =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ TooManyRedirects

Returns a new instance of TooManyRedirects.



41
42
43
44
45
# File 'lib/gmail-contacts.rb', line 41

def initialize(response)
  @response = response
  @location = @response['Location']
  super "exceeded maximum of #{MAX_REDIRECTS} redirects (Location: #{location})"
end

Instance Attribute Details

#locationObject (readonly)

Returns the value of attribute location.



37
38
39
# File 'lib/gmail-contacts.rb', line 37

def location
  @location
end

#responseObject (readonly)

Returns the value of attribute response.



37
38
39
# File 'lib/gmail-contacts.rb', line 37

def response
  @response
end