class FFlags::RedisClient
Redis Client
Public Class Methods
all(key)
click to toggle source
# File lib/fflags/redis_client.rb, line 9 def all(key) client.hgetall(key) end
get(key, field)
click to toggle source
# File lib/fflags/redis_client.rb, line 13 def get(key, field) client.hget(key, field) end
reset(key)
click to toggle source
# File lib/fflags/redis_client.rb, line 17 def reset(key) client.del(key) end
set(key, field, value)
click to toggle source
# File lib/fflags/redis_client.rb, line 5 def set(key, field, value) client.hmset(key, field, value) == 'OK' end
Private Class Methods
client()
click to toggle source
# File lib/fflags/redis_client.rb, line 23 def client @client ||= Redis.new(url: FFlags.configuration.redis_url) end