Module: EM::Sofa::Mapping

Defined in:
lib/em-sofa/mapping.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

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.

Parameters:

  • base (Module, Class)

    The module that this is included in



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