Class: Breadcrumbs::KeyProxy
- Inherits:
-
Object
- Object
- Breadcrumbs::KeyProxy
- Defined in:
- lib/redis-breadcrumbs/key_proxy.rb
Instance Method Summary collapse
-
#initialize(key, redis) ⇒ KeyProxy
constructor
A new instance of KeyProxy.
- #method_missing(mthd, *args) ⇒ Object
Constructor Details
#initialize(key, redis) ⇒ KeyProxy
Returns a new instance of KeyProxy.
3 4 5 6 |
# File 'lib/redis-breadcrumbs/key_proxy.rb', line 3 def initialize key, redis @key = key @redis = redis end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(mthd, *args) ⇒ Object
8 9 10 |
# File 'lib/redis-breadcrumbs/key_proxy.rb', line 8 def method_missing mthd, *args @redis.send(mthd, *([@key.key_name] + args)) end |