class Riak::ListBuckets

Public Class Methods

new(client, options, block) click to toggle source
# File lib/riak/list_buckets.rb, line 3
def initialize(client, options, block)
  @client = client
  @block = block
  @options = options
  perform_request
end

Public Instance Methods

perform_request() click to toggle source
# File lib/riak/list_buckets.rb, line 10
def perform_request
  @client.backend do |be|
    be.list_buckets @options, &wrapped_block
  end
end

Private Instance Methods

wrapped_block() click to toggle source
# File lib/riak/list_buckets.rb, line 18
def wrapped_block
  proc do |bucket_names|
    next if bucket_names.nil?
    bucket_names.each do |bucket_name|
      bucket = @client.bucket bucket_name
      @block.call bucket
    end
  end
end