Class: RedisObj::Base
- Inherits:
-
Object
- Object
- RedisObj::Base
- Defined in:
- lib/redis_obj/base.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#redis ⇒ Object
Returns the value of attribute redis.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #del_key ⇒ Object
-
#initialize(redis, key = nil) ⇒ Base
constructor
A new instance of Base.
Constructor Details
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
2 3 4 |
# File 'lib/redis_obj/base.rb', line 2 def key @key end |
#redis ⇒ Object
Returns the value of attribute redis.
2 3 4 |
# File 'lib/redis_obj/base.rb', line 2 def redis @redis end |
Instance Method Details
#==(other) ⇒ Object
12 13 14 |
# File 'lib/redis_obj/base.rb', line 12 def == other self.class == other.class and self.key == other.key end |
#del_key ⇒ Object
16 17 18 |
# File 'lib/redis_obj/base.rb', line 16 def del_key redis.del(key) end |