class Redis::Store
Constants
- VERSION
Public Class Methods
new(options = { })
click to toggle source
Calls superclass method
# File lib/redis/store.rb, line 16 def initialize(options = { }) super unless options[:marshalling].nil? puts %Q( DEPRECATED: You are passing the :marshalling option, which has been replaced with `serializer: Marshal` to support pluggable serialization backends. To disable serialization (much like disabling marshalling), pass `serializer: nil` in your configuration. The :marshalling option will be removed for redis-store 2.0. ) end @serializer = options.key?(:serializer) ? options[:serializer] : Marshal unless options[:marshalling].nil? @serializer = options[:marshalling] ? Marshal : nil end _extend_marshalling options _extend_namespace options end
Public Instance Methods
location()
click to toggle source
# File lib/redis/store.rb, line 48 def location if @client.path @client.path else h = @client.host h = "[#{h}]" if h.include?(":") "#{h}:#{@client.port}" end end
reconnect()
click to toggle source
# File lib/redis/store.rb, line 40 def reconnect @client.reconnect end
to_s()
click to toggle source
# File lib/redis/store.rb, line 44 def to_s "Redis Client connected to #{location} against DB #{@client.db}" end
Private Instance Methods
_extend_marshalling(options)
click to toggle source
# File lib/redis/store.rb, line 59 def _extend_marshalling(options) extend Serialization unless @serializer.nil? end
_extend_namespace(options)
click to toggle source
# File lib/redis/store.rb, line 63 def _extend_namespace(options) @namespace = options[:namespace] extend Namespace end