Our module has been extended in a class; we can only add the Instance methods, which become class methods in the class.
# File lib/puppet/util/cacher.rb, line 6 def self.extended(other) class << other extend ClassMethods include InstanceMethods end end
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.
# File lib/puppet/util/cacher.rb, line 15 def self.included(other) other.extend(ClassMethods) other.send(:include, InstanceMethods) end