Module: Breadcrumbs::AsMethods::ClassMethods

Defined in:
lib/redis-breadcrumbs/as_methods.rb

Instance Method Summary collapse

Instance Method Details

#create_as_method(key_template, as) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/redis-breadcrumbs/as_methods.rb', line 11

def create_as_method key_template, as
  instance_eval do
    define_method as.to_sym do
      KeyProxy.new(self.class.keys[key_template], redis)
    end
  end
end