title: Ruby: extend self
body: <p>In Ruby, I understand the basic idea of <code>extend</code>. However, what's happening in this segment of code? Specifically, what does <code>extend</code> do? Is it just a convenient way of making the instance methods into class methods? Why would you do it this way rather than specifying class methods from the beginning?</p>
  
  <pre><code>module Rake
    include Test::Unit::Assertions
  
    def run_tests # etc.
    end
  
    # what does the next line do?
    extend self
  end
  </code></pre>