Exception: Mechanize::RedirectLimitReachedError
- Defined in:
- lib/mechanize/redirect_limit_reached_error.rb
Overview
Raised when too many redirects are sent
Instance Attribute Summary collapse
-
#page ⇒ Object
readonly
Returns the value of attribute page.
-
#redirects ⇒ Object
readonly
Returns the value of attribute redirects.
-
#response_code ⇒ Object
readonly
Returns the value of attribute response_code.
Instance Method Summary collapse
-
#initialize(page, redirects) ⇒ RedirectLimitReachedError
constructor
A new instance of RedirectLimitReachedError.
Constructor Details
#initialize(page, redirects) ⇒ RedirectLimitReachedError
Returns a new instance of RedirectLimitReachedError.
10 11 12 13 14 15 16 |
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 10 def initialize page, redirects @page = page @redirects = redirects @response_code = page.code super "Redirect limit of #{redirects} reached" end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
6 7 8 |
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 6 def page @page end |
#redirects ⇒ Object (readonly)
Returns the value of attribute redirects.
7 8 9 |
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 7 def redirects @redirects end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
8 9 10 |
# File 'lib/mechanize/redirect_limit_reached_error.rb', line 8 def response_code @response_code end |