I am new to anemone gem. I have written the following code:
anemone.on_every_page do |page|
if page.url.to_s.match(/\-ad$/)
unless page.url.to_s.match("restaurant|hotel")
p "not useful url: #{page.url}"
count += 1
if count == 5
break
end
next
else
count=0
end
end
end
Here in break statement I am getting the localjumperror: break from proc-closure. I have no idea how to fix that.