public Method

Module.include_all_modules_from(parent_module)

There's no documentation for this item.

Source Code

# File console_with_helpers.rb, line 2
def include_all_modules_from(parent_module)
  parent_module.constants.each do |const|
    mod = parent_module.const_get(const)
    if mod.class == Module
      send(:include, mod)
      include_all_modules_from(mod)
    end
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.