# File lib/deltacloud/drivers/mock/mock_driver.rb, line 290 def buckets(credentials, opts={}) check_credentials(credentials) buckets = @client.build_all(Bucket) blob_map = @client.load_all(:blobs).inject({}) do |map, blob| map[blob[:bucket]] ||= [] map[blob[:bucket]] << blob[:id] map end buckets.each { |bucket| bucket.blob_list = blob_map[bucket.id] } filter_on( buckets, :id, opts ) end