defunkt/redis-namespace — pull request #37 by j-wilkins (2012-04-04 02:51:03+00:00)
Title: add temporary namespace functionality

I find myself adding code all over the place that does essentially this, and I'm curious as to whether anyone else might find it useful.

my primary use case would be within Resque enqueueing jobs in the namespace they need to be in, but that doesn't make for a very pretty example. Taken from the specs, basically this allows you too:

```ruby
@redis.namespace = :something

@redis.namespace(:'something.else') do
@redis.namespace # => :'something.else'
@redis.set(:some_key, "some value")
end

@redis.namespace #=> :something
```

which would set `:some_key` to `"some value"` in the `:'something.else'` namespace

as far as the specific implementation is concerned I'm open to any suggestions anyone might have.