lib/twenv/command_mixins/perform_action_on_tweets.rb
#
# Performs an action on a set of tweets until there are no tweets left to
# be read.
#
# @param [Proc, #call] read_tweets
#   A Proc that returns an array of tweets.
#
# @param [Proc, #call] perform_action
#   A Proc that receives a tweet and performs an action on it.
#
# @param [Proc, #call]
#   A Proc that receives the count of tweets read so far.
#
# @return [void]
#
Performs an action on a set of tweets until there are no tweets left to
be read.
Performs an action on a set of tweets until there are no tweets left to be read .
def rate_limit_sleep(seconds)
    line.rewind.warn("Rate limited by Twitter for #{seconds} seconds. ")
    sleep 1
    seconds -= 1
    seconds > 0 ? rate_limit_sleep(seconds) : line.rewind
  end
def rate_limit_sleep ( seconds ) line . rewind . warn ( "Rate limited by Twitter for #{seconds} seconds. " ) sleep 1 seconds -= 1 seconds > 0 ? rate_limit_sleep ( seconds ) : line . rewind end
Performs an action on a set of tweets until there are no tweets left to
be read.
Performs an action on a set of tweets until there are no tweets left to be read .
None
void
seconds
<not_specific>
<not_specific>
A Proc that receives the count of tweets read so far.
A Proc that receives the count of tweets read so far .