Class: Redis::BaseObject
- Inherits:
-
Object
- Object
- Redis::BaseObject
- Defined in:
- lib/redis/base_object.rb
Overview
Defines base functionality for all redis-objects.
Instance Method Summary collapse
-
#initialize(key, *args) ⇒ BaseObject
constructor
A new instance of BaseObject.
-
#redis ⇒ Object
Dynamically query the handle to enable resetting midstream.
Constructor Details
#initialize(key, *args) ⇒ BaseObject
Returns a new instance of BaseObject.
4 5 6 7 8 |
# File 'lib/redis/base_object.rb', line 4 def initialize(key, *args) @key = key.is_a?(Array) ? key.flatten.join(':') : key @options = args.last.is_a?(Hash) ? args.pop : {} @myredis = args.first end |