Sha256: 730012e08a577b6d1fa7b72ba54e45dd5057b3082f3724feadd2299483cd0535

Contents?: true

Size: 411 Bytes

Versions: 2

Compression:

Stored size: 411 Bytes

Contents

# frozen_string_literal: true

module Fog
  module Aliyun
    class Storage
      class Real
        def list_buckets(options = {})
          maxKeys = options[:max_keys] || 1000
          maxKeys = maxKeys.to_i
          maxKeys = [maxKeys, 1000].min

          options[:limit] = maxKeys
          options.delete(:max_keys)
          @oss_protocol.list_buckets(options)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-aliyun-0.4.0 lib/fog/aliyun/requests/storage/list_buckets.rb
fog-aliyun-0.3.19 lib/fog/aliyun/requests/storage/list_buckets.rb