# module Puppet::Util::CacheAccumulator::ClassMethods

### Public Instance Methods

accumulates(*attributes) click to toggle source

    # File lib/puppet/util/rails/cache_accumulator.rb, line 48
    def accumulates(*attributes)
      attributes.each {|attrib| install_accumulator(attrib)}
    end

accumulators() click to toggle source

    # File lib/puppet/util/rails/cache_accumulator.rb, line 52
    def accumulators
      @accumulators ||= {}
    end

install_accumulator(attribute) click to toggle source

    # File lib/puppet/util/rails/cache_accumulator.rb, line 56
    def install_accumulator(attribute)
      self.accumulators[attribute] = Base.new(self, attribute)
      module_eval %Q{
        def self.accumulate_by_#{attribute.to_s}(*keys)
          accumulators[:#{attribute.to_s}].find(*keys)
        end
      }
    end