basho/riak-ruby-client — pull request #112 by bkerley (2014-10-29 11:27:19+00:00)
Title: Nicer Bucket Type API

In Riak 2.0, "Bucket Types" are a way to configure and classify buckets (see basho/riak#362 ) .

The existing interface is bad:
```ruby
coffees = client.bucket 'coffees'

chapadao = coffees.new 'chapadao'
chapadao.data = "Chapadao de Ferro"
chapadao.store type: 'beverages' # stores this in the "beverages" bucket type

coffees.get 'chapadao' # raises error, not found
coffees.get 'chapadao', type: 'beverages' # succeeds
```

What would be ideal is a way to make a client-like object scoped to a type:
```ruby
beverages = client.type 'beverages'
coffees = beverages.bucket 'coffees'

chapadao = coffees.new 'chapadao'
chapadao.data = "Chapadao de Ferro"
chapadao.store # stores this in the "beverages" bucket type

coffees.get 'chapadao' # succeeds
```