Sha256: 86d877bb014d6a480031311a2fa62948fa41a75290de17e682be097e6d47aaeb
Contents?: true
Size: 556 Bytes
Versions: 1
Compression:
Stored size: 556 Bytes
Contents
module FFlags # Redis Client class RedisClient class << self # hset doesn't return explicitly true or false def set(key, field, value) return false if value.nil? client.hset(key, field, value.to_s) end def all(key) client.hgetall(key) end def get(key, field) client.hget(key, field) end def reset(key) client.del(key) end private def client @client ||= Redis.new(url: FFlags.configuration.redis_url) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fflags-0.5.0 | lib/fflags/redis_client.rb |