lib/riak/bucket.rb in riak-client-0.8.0.beta2 vs lib/riak/bucket.rb in riak-client-0.8.0
- old
+ new
@@ -175,18 +175,20 @@
# @return [Fixnum] the N value, or number of replicas for this bucket
def n_value
props['n_val']
end
-
+ alias :n_val :n_value
+
# Set the N value (number of replicas). *NOTE* This will result in a PUT request to Riak.
# Setting this value after the bucket has objects stored in it may have unpredictable results.
# @param [Fixnum] value the number of replicas the bucket should keep of each object
def n_value=(value)
self.props = {'n_val' => value}
value
end
-
+ alias :n_val= :n_value=
+
[:r,:w,:dw,:rw].each do |q|
class_eval <<-CODE
def #{q}
props["#{q}"]
end