title: ruby nested classes and modules
body: <p>I am familiar with the concept of nesting classes and modules within another module and grouping them in a namespace. What is the idea / purpose behind </p>
  
  <ol>
  <li><p>Nesting classes within another class</p>
  
  <pre><code>class A
    class B
      def method_B
        ...
      end
    end
  end
  </code></pre></li>
  <li><p>Nesting modules within another class</p>
  
  <pre><code>class A
    module c
      def method_c
        ...
      end
    end
  end
  </code></pre></li>
  </ol>
  
  <p>thanks,
  ash</p>