Class: RedisSnippets::Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_snippets/redis.rb

Class Method Summary collapse

Class Method Details

.get(key) ⇒ Object

Can’t do method_missing on get/set as they’re defined somewhere by Ruby.



5
6
7
# File 'lib/redis_snippets/redis.rb', line 5

def get(key)
  RedisSnippetsEngine.config.redis_snippets[:connection].get(key)
end

.method_missing(method, *args) ⇒ Object



13
14
15
# File 'lib/redis_snippets/redis.rb', line 13

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

.set(key, value) ⇒ Object



9
10
11
# File 'lib/redis_snippets/redis.rb', line 9

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