lib/plagiarism/strategries/google.rb in plagiarism2-0.0.6 vs lib/plagiarism/strategries/google.rb in plagiarism2-0.0.7

- old
+ new

@@ -14,12 +14,12 @@ fields: 'items(link)', prettyPrint: false ) end - def iterate(response) + def iterate(response, action = :all?) results = JSON.parse(response)['items'] || [] - results.all? do |r| + results.send(action) do |r| uri = URI.parse URI::encode(r['link']) yield uri end end