
class Module

  # Include module and apply module_fuction to the 
  # included methods.

  def include_function_module *mod
    include *mod
    module_function *mod.collect{|m| m.private_instance_methods & m.methods(false)}.flatten
  end

end

