Class: Rudis::Base
Direct Known Subclasses
Class Attribute Summary collapse
Instance Method Summary collapse
- #default_options ⇒ Object
-
#initialize(key, options = {}) ⇒ Base
constructor
A new instance of Base.
- #key(*args) ⇒ Object
- #redis ⇒ Object
Methods inherited from Rudis
Constructor Details
#initialize(key, options = {}) ⇒ Base
Returns a new instance of Base.
40 41 42 43 44 |
# File 'lib/rudis/base.rb', line 40 def initialize(key, ={}) @key = key @options = @options.rmerge!() end |
Class Attribute Details
.redis ⇒ Object
31 32 33 |
# File 'lib/rudis/base.rb', line 31 def self.redis @redis ||= super end |
Instance Method Details
#default_options ⇒ Object
46 47 48 |
# File 'lib/rudis/base.rb', line 46 def {} end |
#key(*args) ⇒ Object
50 51 52 |
# File 'lib/rudis/base.rb', line 50 def key(*args) self.class.key(@key, *args) end |
#redis ⇒ Object
36 37 38 |
# File 'lib/rudis/base.rb', line 36 def redis @redis ||= self.class.redis end |