Sha256: f4b0abb8c185b74e3ab52c31480a5ec687360430b4b0278d01d66e050946cec5
Contents?: true
Size: 822 Bytes
Versions: 2
Compression:
Stored size: 822 Bytes
Contents
class Class def getAddedMethods(base=nil) begin b='' cmd="#{self.name}.new(::Crdf_Repository.new(),'abc')" c=eval cmd return c.public_methods-b.public_methods rescue return [] end end end # returns a completion file # for methods, class and modules created by loadModule def getCompletionFile(&loadModules) b=Array.new ObjectSpace.each_object(Class) { |o| b.push(o.to_s) } yield() ObjectSpace.each_object(Class) { |o| next if b.include?(o.to_s) next unless o.to_s.index('#').nil? s=String.new c=Class.new puts <<TPL module #{o.name.gsub(/^C/,'M') }#{o.getAddedMethods.collect {|m| %{ def #{m.to_s} ; end} }} end TPL } end require 'erb' getCompletionFile { require 'ontomde-uml2' m=Crdf_Repository.new m.loadUml2 }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ontomde-core-2.0.4 | lib/ontomde-core/completion.rb |
ontomde-core-2.0.5 | lib/ontomde-core/completion.rb |