lib/riak/bucket.rb in riak-client-1.4.5 vs lib/riak/bucket.rb in riak-client-2.0.0.rc1
- old
+ new
@@ -1,10 +1,10 @@
require 'riak/util/translation'
require 'riak/client'
require 'riak/robject'
require 'riak/counter'
-require 'riak/failed_request'
+require 'riak/errors/failed_request'
module Riak
# Represents and encapsulates operations on a Riak bucket. You may retrieve a bucket
# using {Client#bucket}, or create it manually and retrieve its meta-information later.
class Bucket
@@ -99,10 +99,10 @@
@client.get_object(self, key, options)
end
alias :[] :get
# Retrieve multiple keys from this bucket.
- # @param [Array<String>] array of keys to fetch
+ # @param [Array<String>] keys array of keys to fetch
# @return [Hash<String, Riak::RObject>] hash of keys to objects
def get_many(keys)
pairs = keys.map{|k| [self, k]}
results = Multiget.get_all @client, pairs
results.keys.inject(Hash.new) { |mem, var| mem[var[1]] = results[var]; mem }