Class: Bitbucket::Collection

Inherits:
Enumerator
  • Object
show all
Defined in:
lib/bitbucket/collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(paginator) ⇒ Collection

Returns a new instance of Collection.


5
6
7
8
9
10
11
12
13
# File 'lib/bitbucket/collection.rb', line 5

def initialize(paginator)
  super() do |yielder|
    loop do
      paginator.items.each { |item| yielder << item }
    end
  end

  lazy
end