title: What is the difference between include and extend in Ruby?
body: <p>Just getting my head around Ruby metaprogramming. The mixin/modules always manage to confuse me. </p>
  
  <ul>
  <li><strong>include</strong>: mixes in specified module methods as <strong>instance methods</strong> in the target class</li>
  <li><strong>extend</strong>: mixes in specified module methods as <strong>class methods</strong> in the target class</li>
  </ul>
  
  <p><em>So is the major difference just this or is a bigger dragon lurking?</em>
  e.g.</p>
  
  <pre><code>module ReusableModule
    def module_method
      puts "Module Method: Hi there!"
    end
  end
  
  class ClassThatIncludes
    include ReusableModule
  end
  class ClassThatExtends
    extend ReusableModule
  end
  
  puts "Include"
  ClassThatIncludes.new.module_method       # "Module Method: Hi there!"
  puts "Extend"
  ClassThatExtends.module_method            # "Module Method: Hi there!"
  </code></pre>