Module: EM::Sofa::Mapping
- Defined in:
- lib/em-sofa/mapping.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.included(base) ⇒ Object
This method is automatically called when Mapping is included in a module.
Class Method Details
.included(base) ⇒ Object
This method is automatically called when EM::Sofa::Mapping is included in a module. It automatically adds InstanceMethods, ClassMethods and initializes @mappings and @mappings_procs to empty Hashes.
8 9 10 11 12 13 |
# File 'lib/em-sofa/mapping.rb', line 8
def self.included(base)
base.send(:include, InstanceMethods)
base.extend(ClassMethods)
base.instance_variable_set("@mappings", {})
base.instance_variable_set("@mappings_procs", {})
end
|