class MetaModule::MModule

subclassing of mmodule sort of sucks? use mixin with anonymous module instead?

Public Class Methods

new(*) click to toggle source

I use .new so don’t bother user to use super in initialize

Calls superclass method
# File lib/meta_module.rb, line 9
def self.new(*)
  super.tap { |x| x.send :include, self::Methods }
end
used(&block) click to toggle source
# File lib/meta_module.rb, line 13
def self.used &block
  eval 'define_method :extended, &block' # to hide this line from mutant!
  # define_method :extended              # because this works too! with some warnings though:)
end