Module: Twitter::Enumerable
- Includes:
- Enumerable
- Included in:
- Cursor, GeoResults, PremiumSearchResults, SearchResults, TrendResults
- Defined in:
- lib/twitter/enumerable.rb
Overview
Provides iteration support for collections
Instance Method Summary collapse
-
#each(start = 0) {|Object| ... } ⇒ Enumerator
Iterates over the collection.
Instance Method Details
#each(start = 0) {|Object| ... } ⇒ Enumerator
Iterates over the collection
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/twitter/enumerable.rb', line 14 def each(start = 0, &block) return to_enum(:each, start) unless block Array(@collection[start..]).each(&block) # steep:ignore FallbackAny unless finished? start = [@collection.size, start].max # steep:ignore FallbackAny fetch_next_page each(start, &block) end self end |