title: Ruby: What does module included in a method means?
body: <p>I know that a module can be included in a class or another module.
  But, I saw <a href="http://codeshooter.wordpress.com/2008/09/27/including-and-extending-modules-in-ruby/#highlighter_98864" rel="noreferrer">here</a> that a module is included <strong>in a method</strong>. What do this means ?</p>
  
  <pre><code>module ActsAsVotable
  
    module ClassMethods
  
      def acts_as_votable
        has_many :votes, :as =&gt; :votable, :dependent =&gt; :delete_all
        include InstanceMethods    # What does this means ??
      end
  
    end
  
    module InstanceMethods
  
      def cast_vote( vote )
        Vote.create( :votable =&gt; self, :up =&gt; vote == :up )
      end
  
    end
  
  end
  </code></pre>