Method: Sink::PageCursorSharedRef#auto_paging_each
- Defined in:
- lib/sink/page_cursor_shared_ref.rb
#auto_paging_each(&blk) ⇒ nil
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/sink/page_cursor_shared_ref.rb', line 55 def auto_paging_each(&blk) if !blk raise "A block must be given to #auto_paging_each" end page = self loop do page.data.each { |e| blk.call(e) } break if !page.next_page? page = page.next_page end end |