Class: Redis::Store

Inherits:
Redis
  • Object
show all
Includes:
Interface, Ttl
Defined in:
lib/redis/store.rb,
lib/redis/store/ttl.rb,
lib/redis/store/version.rb,
lib/redis/store/interface.rb,
lib/redis/store/namespace.rb,
lib/redis/store/marshalling.rb

Defined Under Namespace

Modules: Interface, Marshalling, Namespace, Ttl, VERSION

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Ttl

#set, #setnx

Methods included from Interface

#get, #set, #setnx

Constructor Details

#initialize(options = { }) ⇒ Store

Returns a new instance of Store.



5
6
7
8
9
# File 'lib/redis/store.rb', line 5

def initialize(options = { })
  super
  _extend_marshalling options
  _extend_namespace   options
end

Class Method Details

.rails3?Boolean

:nodoc:

Returns:

  • (Boolean)


11
12
13
# File 'lib/redis/store.rb', line 11

def self.rails3? #:nodoc:
  defined?(::Rails) && ::Rails::VERSION::MAJOR == 3
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/redis/store.rb', line 15

def to_s
  "Redis Client connected to #{@client.host}:#{@client.port} against DB #{@client.db}"
end