Class: Smooth::Backends::RedisNamespace

Inherits:
Redis
  • Object
show all
Defined in:
lib/smooth/backends/redis_namespace.rb

Instance Attribute Summary

Attributes inherited from Redis

#connection, #namespace

Instance Method Summary collapse

Methods inherited from Redis

#create, #destroy, #index, #show, #update

Methods inherited from Base

#create, #destroy, #index, #maximum_updated_at, #query, #records, #show, #update

Constructor Details

#initialize(options = {}) ⇒ RedisNamespace

Returns a new instance of RedisNamespace.



4
5
6
7
# File 'lib/smooth/backends/redis_namespace.rb', line 4

def initialize options={}
  @namespace, @priority = options.values_at(:namespace, :priority)
  @connection           = ::Redis::Namespace.new( @namespace, redis: ::Redis.new(options.fetch(:redis_options, {})))
end