Class: Aliyun::OSS::Iterator::Uploads
- Defined in:
- lib/aliyun/oss/iterator.rb
Overview
Uploads iterator
Instance Method Summary collapse
- #fetch(more) ⇒ Object
-
#initialize(protocol, bucket_name, opts = {}) ⇒ Uploads
constructor
A new instance of Uploads.
Methods inherited from Base
Constructor Details
#initialize(protocol, bucket_name, opts = {}) ⇒ Uploads
Returns a new instance of Uploads.
76 77 78 79 |
# File 'lib/aliyun/oss/iterator.rb', line 76 def initialize(protocol, bucket_name, opts = {}) super(protocol, opts) @bucket = bucket_name end |
Instance Method Details
#fetch(more) ⇒ Object
81 82 83 84 85 86 87 |
# File 'lib/aliyun/oss/iterator.rb', line 81 def fetch(more) @results, cont = @protocol.list_multipart_uploads(@bucket, more) @results = cont[:common_prefixes] + @results if cont[:common_prefixes] @more[:id_marker] = cont[:next_id_marker] @more[:key_marker] = cont[:next_key_marker] @more[:truncated] = cont[:truncated] || false end |