Created
September 16, 2014 15:24
-
-
Save rochefort/7df152da332cad37243e to your computer and use it in GitHub Desktop.
chapger4-4-5 p.239
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/chapter4/anemone-errorcode.rb b/chapter4/anemone-errorcode.rb | |
index 2e08289..d532bfb 100644 | |
--- a/chapter4/anemone-errorcode.rb | |
+++ b/chapter4/anemone-errorcode.rb | |
@@ -12,9 +12,9 @@ opts = { | |
Anemone.crawl(urls, opts) do |anemone| | |
anemone.on_every_page do |page| | |
puts page.url | |
- raise '500 Error!:' + page.url.path.to_s if page.code = 500 | |
+ raise '500 Error!:' + page.url.path.to_s if page.code == 500 | |
end | |
anemone.after_crawl do |pages| | |
puts "hoge" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment