title: ruby - extend module inside another module
body: <p>I'm trying to define a couple of modules to easily add in some instance and class methods to other classes, here's what I'm doing:</p>
  
  <pre><code>module Foo
    module Bar
      def speak
        puts "hey there"
      end
    end
    module Baz
      extend Foo::Bar
  
      def welcome
        puts "welcome, this is an instance method"
      end
    end
  end
  
  class Talker
    include Foo::Baz
  end
  
  Talker.new.welcome
  Talker.speak
  </code></pre>
  
  <p>The output of this is:</p>
  
  <pre><code>welcome, this is an instance method
  undefined method 'speak' for Talker.class (NoMethodError)
  </code></pre>
  
  <p>I was expecting Talker to have the 'speak' method since it includes Foo::Baz which itself extends Foo::Bar.</p>
  
  <p>What am I missing?</p>