lib/riak/bucket.rb in riak-client-2.1.0 vs lib/riak/bucket.rb in riak-client-2.2.0.pre1
- old
+ new
@@ -237,10 +237,25 @@
props['search'] == true || (props.has_key?('precommit') && props['precommit'].include?(SEARCH_PRECOMMIT_HOOK))
end
# @return [String] a representation suitable for IRB and debugging output
def inspect
- "#<Riak::Bucket {#{name}}#{" keys=[#{keys.join(',')}]" if defined?(@keys)}>"
+ "#<Riak::Bucket {#{name}}>"
+ end
+
+ # Pretty prints the bucket for `pp` or `pry`.
+ def pretty_print(pp)
+ pp.object_group self do
+ pp.breakable
+ pp.text "name=#{name}"
+ end
+ end
+
+ # Does this {Bucket} have a non-default bucket type? {BucketTyped::Bucket}
+ # instances with non-default types return `true`.
+ # @return [Boolean] false
+ def needs_type?
+ false
end
# @return [true,false] whether the other is equivalent
def ==(other)
Bucket === other && other.client == client && other.name == name