Module: Filigree::ClassMethodsModule

Included in:
Application, Commands, Configuration, TypedClass, Visitor
Defined in:
lib/filigree/class_methods_module.rb

Overview

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.

Class Method Summary collapse

Class Method Details

.included(mod) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
# 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