Skip to content

Commit

Permalink
shorthand for HTTPSuccess response
Browse files Browse the repository at this point in the history
  • Loading branch information
taganaka committed Jun 1, 2014
1 parent ad44653 commit 36397f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/polipus/page.rb
Expand Up @@ -129,6 +129,14 @@ def redirect?
(300..307).include?(@code)
end

#
# Returns +true+ if the page is a HTTP success, returns +false+
# otherwise.
#
def success?
(200..206).include?(@code)
end

#
# Returns +true+ if the page was not found (returned 404 code),
# returns +false+ otherwise.
Expand Down

0 comments on commit 36397f0

Please sign in to comment.