Sha256: 5f34c4a376a3ca8b7d8fb396b41d2e831457cacd2e5b272dba8944be3205c242
Contents?: true
Size: 424 Bytes
Versions: 241
Compression:
Stored size: 424 Bytes
Contents
module RGen module MetamodelBuilder def self.MMMultiple(*superclasses) c = Class.new(MMBase) class << c attr_reader :multiple_superclasses end c.instance_variable_set(:@multiple_superclasses, superclasses) superclasses.collect{|sc| sc.ancestors}.flatten. reject{|m| m.is_a?(Class)}.each do |arg| c.instance_eval do include arg end end return c end end end
Version data entries
241 entries across 241 versions & 3 rubygems