ruby module_function vs including module
===

In ruby, I understand that module functions can be made available without mixing in the module by using `module_function` as shown here. I can see how this is useful so you can use the function without mixing in the module.

    module MyModule
      def do_something
        puts "hello world"
      end
      module_function :do_something
    end


My question is though why you might want to have the function defined both of these ways.

Why not just have

    def MyModule.do_something

OR

    def do_something
    
What kind of case would it be useful to have the function available to be mixed in or be used as a static method?