Class: Bitbucket::Collection
- Inherits:
-
Enumerator
- Object
- Enumerator
- Bitbucket::Collection
- Defined in:
- lib/bitbucket/collection.rb
Instance Attribute Summary collapse
-
#paginator ⇒ Object
readonly
Returns the value of attribute paginator.
Instance Method Summary collapse
-
#initialize(paginator) ⇒ Collection
constructor
A new instance of Collection.
Constructor Details
#initialize(paginator) ⇒ Collection
Returns a new instance of Collection.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bitbucket/collection.rb', line 9 def initialize(paginator) @paginator = paginator super() do |yielder| loop do paginator.items.each { |item| yielder << item } end end lazy end |
Instance Attribute Details
#paginator ⇒ Object (readonly)
Returns the value of attribute paginator.
5 6 7 |
# File 'lib/bitbucket/collection.rb', line 5 def paginator @paginator end |