Module: Cash::Config

Defined in:
lib/cash/config.rb

Defined Under Namespace

Modules: ClassMethods Classes: Config

Class Method Summary collapse

Class Method Details

.create(active_record, options, indices = []) ⇒ Object



3
4
5
6
# File 'lib/cash/config.rb', line 3

def self.create(active_record, options, indices = [])
  active_record.cache_config = Cash::Config::Config.new(active_record, options)
  indices.each { |i| active_record.index i.attributes, i.options }
end

.included(a_module) ⇒ Object



8
9
10
11
12
13
# File 'lib/cash/config.rb', line 8

def self.included(a_module)
  a_module.module_eval do
    extend ClassMethods
    delegate :repository, :to => "self.class"
  end
end