Sha256: 90759edc152c4bb408243d570f4f9a573195d0ec51695b18f8b9ed226f3e400d

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

module RedisSnippets
  class Redis
    class << self
      # Can't do method_missing on get/set as they're defined somewhere by Ruby.
      def get(key)
        RedisSnippetsEngine.config.redis_snippets[:connection].get(key)
      end

      def set(key, value)
        RedisSnippetsEngine.config.redis_snippets[:connection].set(key, value)
      end

      def method_missing(method, *args)
        RedisSnippetsEngine.config.redis_snippets[:connection].send(method, *args)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
redis_snippets-0.0.5 lib/redis_snippets/redis.rb
redis_snippets-0.0.4 lib/redis_snippets/redis.rb
redis_snippets-0.0.3 lib/redis_snippets/redis.rb
redis_snippets-0.0.2 lib/redis_snippets/redis.rb
redis_snippets-0.0.1 lib/redis_snippets/redis.rb