title: Ruby: How to get name of parent module relative to self?
body: <p>I'm trying to get the name of the parent module of my subclass:</p>
  
  <pre><code>module Special
    class BaseController
      def self.action
        puts Module.nesting.inspect # i want this to be relative to self
      end
    end
  end
  
  module Foobar
    class Controller &lt; Special::BaseController
      action do
        # should print Foobar::Controller
      end
    end
  end
  </code></pre>
  
  <p>How can I get the parent module of the subclass instead of the base class?</p>