Class: Istox::RedisBoot
- Inherits:
-
Object
- Object
- Istox::RedisBoot
- Defined in:
- lib/istox/helpers/redis_boot.rb
Class Method Summary collapse
- .del(k, db) ⇒ Object
- .exists(key, db) ⇒ Object
- .flushdb(db) ⇒ Object
- .get(k, db) ⇒ Object
- .incr(k, db) ⇒ Object
- .llen(key, db) ⇒ Object
- .rename(old, new, db) ⇒ Object
- .scan(cursor, options = {}, db) ⇒ Object
- .sets(k, v, options = {}, db) ⇒ Object
Class Method Details
.del(k, db) ⇒ Object
14 15 16 |
# File 'lib/istox/helpers/redis_boot.rb', line 14 def del(k, db) redis(db).del(k) end |
.exists(key, db) ⇒ Object
34 35 36 |
# File 'lib/istox/helpers/redis_boot.rb', line 34 def exists(key, db) redis(db).exists key end |
.flushdb(db) ⇒ Object
22 23 24 |
# File 'lib/istox/helpers/redis_boot.rb', line 22 def flushdb(db) redis(db).flushdb end |
.get(k, db) ⇒ Object
18 19 20 |
# File 'lib/istox/helpers/redis_boot.rb', line 18 def get(k, db) redis(db).get(k) end |
.incr(k, db) ⇒ Object
26 27 28 |
# File 'lib/istox/helpers/redis_boot.rb', line 26 def incr(k, db) redis(db).incr(k) end |
.llen(key, db) ⇒ Object
38 39 40 |
# File 'lib/istox/helpers/redis_boot.rb', line 38 def llen(key, db) redis(db).llen key end |
.rename(old, new, db) ⇒ Object
30 31 32 |
# File 'lib/istox/helpers/redis_boot.rb', line 30 def rename(old, new, db) redis(db).rename old, new end |
.scan(cursor, options = {}, db) ⇒ Object
10 11 12 |
# File 'lib/istox/helpers/redis_boot.rb', line 10 def scan(cursor, = {}, db) redis(db).scan cursor, end |
.sets(k, v, options = {}, db) ⇒ Object
6 7 8 |
# File 'lib/istox/helpers/redis_boot.rb', line 6 def sets(k, v, = {}, db) redis(db).set(k, v, ) end |