Module: Sofa::Mapping

Included in:
TVRage::Episode, TVRage::Season, TVRage::Show
Defined in:
lib/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 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/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