Permalink
Browse files

Rename local variable

  • Loading branch information...
1 parent 38a2a97 commit 7735f732198b3bd8123e6cd85c42cdf2d70960f7 @sferik committed Nov 20, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/t/collectable.rb
View
@@ -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

0 comments on commit 7735f73

Please sign in to comment.