module Filigree::ClassMethodsModule

Including this in a module will cause any class that includes the client module to also extend itself with the <client module>::ClassMethods module. If this module is not defined a NameError will be thrown when the client module is included.

Public Class Methods

included(mod) click to toggle source
# File lib/filigree/class_methods_module.rb, line 32
def self.included(mod)
        mod.instance_exec do
                def included(mod)
                        mod.extend(self::ClassMethods) if self.const_defined?(:ClassMethods)

                        if self.method_defined?(:ClassVariables)
                                mod.instance_exec(self.method(:ClassVariables))
                        end
                end
        end
end

Public Instance Methods

included(mod) click to toggle source
# File lib/filigree/class_methods_module.rb, line 34
def included(mod)
        mod.extend(self::ClassMethods) if self.const_defined?(:ClassMethods)

        if self.method_defined?(:ClassVariables)
                mod.instance_exec(self.method(:ClassVariables))
        end
end