Module: ActiveFacts::TraitInjector

Included in:
Generators::DataVaultTraits, Generators::OOTraits, Generators::OrderedTraits, Generators::RubyTraits, Generators::ScalaTraits
Defined in:
lib/activefacts/generators/helpers/inject.rb

Class Method Summary collapse

Class Method Details

.included(other) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/activefacts/generators/helpers/inject.rb', line 5

def self.included other
  overlap = Metamodel.constants & other.constants
  overlap.each do |const|
	mix_into = Metamodel.const_get(const)
	mix_in = other.const_get(const)
	mix_into.instance_exec {
	  include(mix_in)
	}
  end
end