title: checking if a method is defined on the class
body: <p>How do I check if a method is defined on some class directly, not by inheritance or by inclusion/extension? I want something like 'foo?' in the following:</p>
  
  <pre><code>class A
     def a; end
  end
  
  module B
     def b; end
  end
  
  class C &lt; A
     include B
     def c; end
  end
  
  C.foo?(:a) #=&gt; false
  C.foo?(:b) #=&gt; false
  C.foo?(:c) #=&gt; true
  </code></pre>