Class: WWW::Mechanize::File
- Defined in:
- lib/cucumber/webrat/mechanize_world.rb
Instance Attribute Summary collapse
-
#redirects ⇒ Object
Returns the value of attribute redirects.
Instance Method Summary collapse
- #error? ⇒ Boolean
- #redirect? ⇒ Boolean
- #response_code ⇒ Object
- #success? ⇒ Boolean
- #unauthorized? ⇒ Boolean
Instance Attribute Details
#redirects ⇒ Object
Returns the value of attribute redirects.
32 33 34 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 32 def redirects @redirects end |
Instance Method Details
#error? ⇒ Boolean
42 43 44 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 42 def error? (500..599).include?(response_code) end |
#redirect? ⇒ Boolean
34 35 36 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 34 def redirect? redirects > 0 end |
#response_code ⇒ Object
38 39 40 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 38 def response_code code.to_i end |
#success? ⇒ Boolean
46 47 48 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 46 def success? (200..299).include?(response_code) end |
#unauthorized? ⇒ Boolean
50 51 52 |
# File 'lib/cucumber/webrat/mechanize_world.rb', line 50 def response_code == 401 end |