Sha256: e02bd325907eecb824fac3af07f52e1d7971b009a2b16df3215cbfdbc941bbe0

Contents?: true

Size: 335 Bytes

Versions: 5

Compression:

Stored size: 335 Bytes

Contents

require 'activefacts/metamodel'

module ActiveFacts
  module TraitInjector
    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
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activefacts-generators-1.8.3 lib/activefacts/generators/helpers/inject.rb
activefacts-generators-1.8.2 lib/activefacts/generators/helpers/inject.rb
activefacts-generators-1.8.1 lib/activefacts/generators/helpers/inject.rb
activefacts-generators-1.8.0 lib/activefacts/generators/helpers/inject.rb
activefacts-generators-1.7.1 lib/activefacts/generators/helpers/inject.rb