Module: Redundancy::ClassMethods

Defined in:
lib/redundancy.rb

Instance Method Summary collapse

Instance Method Details

#cache_column(association, attribute, options = {}) ⇒ Object



39
40
41
42
# File 'lib/redundancy.rb', line 39

def cache_column association, attribute, options = {}
  options.assert_valid_keys(:cache_column, :default)
  Utils.cache_column self, association, attribute, options
end

#cache_method(association, attribute, options = {}) ⇒ Object



44
45
46
47
# File 'lib/redundancy.rb', line 44

def cache_method association, attribute, options = {}
  options.assert_valid_keys(:cache_method)
  Utils.cache_method self, association, attribute, options
end

#redundanciesObject



49
50
51
# File 'lib/redundancy.rb', line 49

def redundancies
  @redundancies ||= []
end

#update_redundanciesObject



53
54
55
56
57
# File 'lib/redundancy.rb', line 53

def update_redundancies
  all.each do |record|
    record.update_redundancies
  end
end