Class: Istox::RedisBoot
- Inherits:
-
Object
- Object
- Istox::RedisBoot
- Defined in:
- lib/istox/helpers/redis.rb
Class Method Summary collapse
- .del(k, db) ⇒ Object
- .exists(key, db) ⇒ Object
- .flushdb(db) ⇒ Object
- .get(k, db) ⇒ Object
- .incr(k, db) ⇒ Object
- .keys(p, db) ⇒ Object
- .llen(key, db) ⇒ Object
- .rename(old, new, db) ⇒ Object
- .sets(k, v, options = {}, db) ⇒ Object
Class Method Details
.del(k, db) ⇒ Object
15 16 17 |
# File 'lib/istox/helpers/redis.rb', line 15 def del(k, db) redis(db).del(k) end |
.exists(key, db) ⇒ Object
35 36 37 |
# File 'lib/istox/helpers/redis.rb', line 35 def exists(key, db) redis(db).exists key end |
.flushdb(db) ⇒ Object
23 24 25 |
# File 'lib/istox/helpers/redis.rb', line 23 def flushdb(db) redis(db).flushdb end |
.get(k, db) ⇒ Object
19 20 21 |
# File 'lib/istox/helpers/redis.rb', line 19 def get(k, db) redis(db).get(k) end |
.incr(k, db) ⇒ Object
27 28 29 |
# File 'lib/istox/helpers/redis.rb', line 27 def incr(k, db) redis(db).incr(k) end |
.keys(p, db) ⇒ Object
11 12 13 |
# File 'lib/istox/helpers/redis.rb', line 11 def keys(p, db) redis(db).keys p end |
.llen(key, db) ⇒ Object
39 40 41 |
# File 'lib/istox/helpers/redis.rb', line 39 def llen(key, db) redis(db).llen key end |
.rename(old, new, db) ⇒ Object
31 32 33 |
# File 'lib/istox/helpers/redis.rb', line 31 def rename(old, new, db) redis(db).rename old, new end |
.sets(k, v, options = {}, db) ⇒ Object
7 8 9 |
# File 'lib/istox/helpers/redis.rb', line 7 def sets(k,v, = {}, db) redis(db).set(k,v, ) end |