lib/aerospike/command/batch_index_node.rb in aerospike-3.0.0 vs lib/aerospike/command/batch_index_node.rb in aerospike-4.0.0
- old
+ new
@@ -17,16 +17,15 @@
module Aerospike
class BatchIndexNode #:nodoc:
- attr_accessor :node
- attr_accessor :keys_by_idx
+ attr_accessor :node, :keys_by_idx
def self.generate_list(cluster, replica_policy, keys)
keys.each_with_index
- .group_by { |key, _| cluster.get_node_for_key(replica_policy, key) }
- .map { |node, keys_with_idx| BatchIndexNode.new(node, keys_with_idx) }
+ .group_by { |key, _| cluster.get_node_for_key(replica_policy, key) }
+ .map { |node, keys_with_idx| BatchIndexNode.new(node, keys_with_idx) }
end
def initialize(node, keys_with_idx)
@node = node
@keys_by_idx = keys_with_idx.map(&:reverse).to_h