Class: Breadcrumbs::KeyProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/redis-breadcrumbs/key_proxy.rb

Instance Method Summary collapse

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