Exception: WWW::Mechanize::RedirectLimitReachedError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- WWW::Mechanize::RedirectLimitReachedError
- Defined in:
- lib/www/mechanize/redirect_limit_reached_error.rb
Overview
Thrown 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.
- #to_s ⇒ Object (also: #inspect)
Constructor Details
#initialize(page, redirects) ⇒ RedirectLimitReachedError
Returns a new instance of RedirectLimitReachedError.
6 7 8 9 10 |
# File 'lib/www/mechanize/redirect_limit_reached_error.rb', line 6 def initialize(page, redirects) @page = page @redirects = redirects @response_code = page.code end |
Instance Attribute Details
#page ⇒ Object (readonly)
Returns the value of attribute page.
5 6 7 |
# File 'lib/www/mechanize/redirect_limit_reached_error.rb', line 5 def page @page end |
#redirects ⇒ Object (readonly)
Returns the value of attribute redirects.
5 6 7 |
# File 'lib/www/mechanize/redirect_limit_reached_error.rb', line 5 def redirects @redirects end |
#response_code ⇒ Object (readonly)
Returns the value of attribute response_code.
5 6 7 |
# File 'lib/www/mechanize/redirect_limit_reached_error.rb', line 5 def response_code @response_code end |
Instance Method Details
#to_s ⇒ Object Also known as: inspect
12 13 14 |
# File 'lib/www/mechanize/redirect_limit_reached_error.rb', line 12 def to_s "Maximum redirect limit (#{redirects}) reached" end |