class AliyunSDK::OSS::Iterator::Objects

Objects iterator

Public Class Methods

new(protocol, bucket_name, opts = {}) click to toggle source
Calls superclass method AliyunSDK::OSS::Iterator::Base::new
# File lib/aliyun_sdk/oss/iterator.rb, line 58
def initialize(protocol, bucket_name, opts = {})
  super(protocol, opts)
  @bucket = bucket_name
end

Public Instance Methods

fetch(more) click to toggle source
# File lib/aliyun_sdk/oss/iterator.rb, line 63
def fetch(more)
  @results, cont = @protocol.list_objects(@bucket, more)
  @results = cont[:common_prefixes] + @results if cont[:common_prefixes]
  @more[:marker] = cont[:next_marker]
  @more[:truncated] = cont[:truncated] || false
end