Module: Puppet::Util::Cacher

Defined Under Namespace

Modules: ClassMethods, Expirer, InstanceMethods

Instance Attribute Summary

Attributes included from Expirer

#timestamp

Class Method Summary collapse

Methods included from Expirer

dependent_data_expired?, expire

Class Method Details

.extended(other) ⇒ Object

Our module has been extended in a class; we can only add the Instance methods, which become class methods in the class.



25
26
27
28
29
30
# File 'lib/puppet/util/cacher.rb', line 25

def self.extended(other)
  class << other
    extend ClassMethods
    include InstanceMethods
  end
end

.included(other) ⇒ Object

Our module has been included in a class, which means the class gets the class methods and all of its instances get the instance methods.



34
35
36
37
# File 'lib/puppet/util/cacher.rb', line 34

def self.included(other)
  other.extend(ClassMethods)
  other.send(:include, InstanceMethods)
end