sferik/twitter — pull request #635 by mzaccari (2014-12-30 10:40:18+00:00)
Title: Add page enumerator and access to the rate limit in the cursor

This builds on @lfittl's pull request, https://github.com/sferik/twitter/pull/626, and uses sferik's comments to hopefully improve the interfaces between the `Enumerable`, `Cursor`, and `RateLimit` classes. With this we can check the state of the rate limit to ensure we don't exceed it:

```ruby
client.follower_ids(count: 500).each_page_with_cursor do |follower_ids, cursor|
# do something with follower_ids

break if cursor.rate_limit.reached?
end
```

I tried to DRY up the rpsec tests as best I could for the `Enumerable` classes. Any feedback is appreciated.