Module: T::Collectable
- Included in:
- T::CLI::Follow, T::CLI::List::Add, T::CLI::List::Remove, T::CLI::Unfollow
- Defined in:
- lib/t/collectable.rb
Instance Method Summary collapse
Instance Method Details
#collect_with_cursor(collection = [], cursor = -1,, &block) ⇒ Object
4 5 6 7 8 |
# File 'lib/t/collectable.rb', line 4 def collect_with_cursor(collection=[], cursor=-1, &block) object = yield cursor collection += object.collection object.next_cursor.zero? ? collection : collect_with_cursor(collection, object.next_cursor) end |