Sha256: f1a8fd4a40d1fe9508f5d3b425b3673e582f0432d33558638307e47aa70ed816

Contents?: true

Size: 726 Bytes

Versions: 2

Compression:

Stored size: 726 Bytes

Contents

class Redis
  class Store < self
    include Ttl, Interface

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

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

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

    private
      def _extend_marshalling(options)
        @marshalling = !(options[:marshalling] === false) # HACK - TODO delegate to Factory
        extend Marshalling if @marshalling
      end

      def _extend_namespace(options)
        @namespace = options[:namespace]
        extend Namespace if @namespace
      end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
redis-store-1.0.0.beta4 lib/redis/store.rb
nono-redis-store-1.0.0 lib/redis/store.rb