Sha256: 6aff098ed086d93fc7b249c56218a1ae3c2b9c3c8d959f14e636e4e184ca2f38

Contents?: true

Size: 822 Bytes

Versions: 227

Compression:

Stored size: 822 Bytes

Contents

require 'rgen/ecore/ecore_interface'
require 'rgen/metamodel_builder/intermediate/annotation'

module RGen

module MetamodelBuilder

# This module is used to extend modules which should be
# part of RGen metamodels
module ModuleExtension
  include RGen::ECore::ECoreInterface
  
  def annotation(hash)
    _annotations << Intermediate::Annotation.new(hash)
  end
  
  def _annotations
    @_annotations ||= []
  end

  def _constantOrder
    @_constantOrder ||= []
  end
  
  def final_method(m)
    @final_methods ||= []
    @final_methods << m
  end
  
  def method_added(m)
    raise "Method #{m} can not be redefined" if @final_methods && @final_methods.include?(m)
  end

  def self.extended(m)
    MetamodelBuilder::ConstantOrderHelper.moduleCreated(m)
  end

end

end

end

Version data entries

227 entries across 227 versions & 3 rubygems

Version Path
puppet-4.10.5-universal-darwin lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.4 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.4-x86-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.4-x64-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.4-universal-darwin lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-retrospec-1.4.1 vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.1 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.1-x86-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.1-x64-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.1-universal-darwin lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-retrospec-1.4.0 vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.0 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.0-x86-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.0-x64-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.10.0-universal-darwin lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-retrospec-1.3.2 vendor/gems/puppet-4.5.2/lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.9.4 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.9.4-x86-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.9.4-x64-mingw32 lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb
puppet-4.9.4-universal-darwin lib/puppet/vendor/rgen/lib/rgen/metamodel_builder/module_extension.rb