Exception: Mechanize::RedirectLimitReachedError

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

Overview

Raised when too many redirects are sent

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(page, redirects) ⇒ RedirectLimitReachedError

Returns a new instance of RedirectLimitReachedError.



11
12
13
14
15
16
17
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 11

def initialize page, redirects
  @page          = page
  @redirects     = redirects
  @response_code = page.code

  super "Redirect limit of #{redirects} reached"
end

Instance Attribute Details

#pageObject (readonly)

Returns the value of attribute page.



7
8
9
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 7

def page
  @page
end

#redirectsObject (readonly)

Returns the value of attribute redirects.



8
9
10
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 8

def redirects
  @redirects
end

#response_codeObject (readonly)

Returns the value of attribute response_code.



9
10
11
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 9

def response_code
  @response_code
end