Sha256: 3c8390bdb61b202cc6df74e245395185330f496be35865c7b1b55c413a15d23f
Contents?: true
Size: 409 Bytes
Versions: 1
Compression:
Stored size: 409 Bytes
Contents
class RedisAdapter attr_reader :redis_database private :redis_database def initialize(redis_database) @redis_database = redis_database end def add_toggle(toggle_name) redis_database.set(toggle_name, 't').eql?('OK') end def remove_toggle(toggle_name) redis_database.del(toggle_name).eql?(1) end def exists?(toggle_name) redis_database.get(toggle_name).eql?('t') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chirrin-chirrion-0.1.0 | lib/chirrin-chirrion/database_adapters/redis_adapter.rb |