Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename local variable

  • Loading branch information...
commit 7735f732198b3bd8123e6cd85c42cdf2d70960f7 1 parent 38a2a97
@sferik authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/t/collectable.rb
View
8 lib/t/collectable.rb
@@ -23,15 +23,15 @@ def collect_with_max_id(collection=[], max_id=nil, &block)
tweets.empty? ? collection.flatten : collect_with_max_id(collection, tweets.last.id - 1, &block)
end
- def collect_with_count(number, &block)
+ def collect_with_count(count, &block)
opts = {}
opts[:count] = MAX_NUM_RESULTS
collect_with_max_id do |max_id|
opts[:max_id] = max_id unless max_id.nil?
- opts[:count] = number unless number >= MAX_NUM_RESULTS
- if number > 0
+ opts[:count] = count unless count >= MAX_NUM_RESULTS
+ if count > 0
tweets = yield opts
- number -= tweets.length
+ count -= tweets.length
tweets
end
end.flatten.compact
Please sign in to comment.
Something went wrong with that request. Please try again.