title: Module classes in lib folder
body: <p>I have a lib file lister_extension.rb</p>
  
  <pre><code>module ListerExtension
   def lister
    puts "#{self.class}"
   end
  end
  </code></pre>
  
  <p>And Post model</p>
  
  <pre><code>class Post &lt; ActiveRecord::Base
    has_many :reviews
    extend ListerExtension
    def self.puts_hello
        puts "hello123123"
    end
  end
  </code></pre>
  
  <p>All is good when I call this in <code>rails c</code>:</p>
  
  <pre><code>2.1.1 :003 &gt; Post.lister
   Class
  =&gt; nil 
  </code></pre>
  
  <p>But what happens when I want to add a class to my module? </p>
  
  <p>For example: </p>
  
  <pre><code>module ListerExtension
   class ready
     def lister
      puts "#{self.class}"
     end
   end
  end
  </code></pre>
  
  <p>I get this error </p>
  
  <pre><code>TypeError: wrong argument type Class (expected Module)
  </code></pre>
  
  <p>When I call <code>Post.first</code> in rails c</p>