Sha256: 5e03ad981c2906660ff3a3e2a42a99a5625c44fa4e02f458933a16f702554001

Contents?: true

Size: 726 Bytes

Versions: 5

Compression:

Stored size: 726 Bytes

Contents

module RGen

module ECore

# Mixin to provide access to the ECore model describing a Ruby class or module
# built using MetamodelBuilder.
# The module should be used to +extend+ a class or module, i.e. to make its
# methods class methods.
# 
module ECoreInstantiator
	
	# This method will lazily build to ECore model element belonging to the calling
	# class or module using ECoreTransformer.
	# 
	def ecore
		unless defined?(@@transformer)
			require 'rgen/ecore/ecore_transformer'
			@@transformer = ECoreTransformer.new
		end
		@@transformer.trans(self)
	end	

  def self.clear_ecore_cache
    require 'rgen/ecore/ecore_transformer'
    @@transformer = ECoreTransformer.new
  end
end

end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rgen-0.5.3 lib/rgen/ecore/ecore_instantiator.rb
rgen-0.5.4 lib/rgen/ecore/ecore_instantiator.rb
rgen-0.5.1 lib/rgen/ecore/ecore_instantiator.rb
rgen-0.5.2 lib/rgen/ecore/ecore_instantiator.rb
rgen-0.5.0 lib/rgen/ecore/ecore_instantiator.rb