Sha256: eb125189f4643bd2476fe64984cfa78ec9e5840a0b0df8d8d58f7744cc1de68d

Contents?: true

Size: 336 Bytes

Versions: 5

Compression:

Stored size: 336 Bytes

Contents

require 'activefacts/vocabulary'

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-1.6.0 lib/activefacts/generate/helpers/inject.rb
activefacts-1.5.3 lib/activefacts/generate/helpers/inject.rb
activefacts-1.5.2 lib/activefacts/generate/helpers/inject.rb
activefacts-1.5.1 lib/activefacts/generate/helpers/inject.rb
activefacts-1.5.0 lib/activefacts/generate/helpers/inject.rb