title: How do I get the public methods of a class without inherited methods?
body: <p>Given any object I can call <code>#public_methods</code> and see all the methods it will respond to. However, I find it would sometimes be handy to get a quick list of all the public methods that are not inherited, i.e. the stuff that's really part of this class.</p>
  
  <p>I found in "<a href="http://www.deanspot.org/content/easy-way-list-public-methods-ruby-object" rel="noreferrer">Easy way to list public methods for a Ruby object</a>" that if I use:</p>
  
  <pre><code>(Foo.public_methods - Object.public_methods).sort
  </code></pre>
  
  <p>I can filter out a lot of basic Ruby stuff. I'd like to be able to filter everything that was inherited all the way up the chain. If I know the parent class I can filter using it, but I'd like to come up with a generic command that could return an array of the uninherited public methods for any object.</p>