title: How to extend a module and also directly reference its methods in Ruby
body: <p>I have the following code</p>
  <pre><code>module Hello
      def hello_world
          puts &quot;Hello World&quot;
      end
  end
  
  class Test
      extend Hello
  end
  
  test = Test
  test.hello_world
  Hello.hello_world
  </code></pre>
  <p>and this has the following output</p>
  <pre><code>Hello World
  main.rb:13:in `&lt;main&gt;': undefined method `hello_world' for Hello:Module (NoMethodError)
  </code></pre>
  <p>How do I get the code above to work so that both <code>test.hello_world</code> and <code>Hello.hello_world</code> work?</p>