title: Look up all descendants of a class in Ruby
body: <p>I can easily ascend the class hierarchy in Ruby:</p>
  
  <pre><code>String.ancestors     # [String, Enumerable, Comparable, Object, Kernel]
  Enumerable.ancestors # [Enumerable]
  Comparable.ancestors # [Comparable]
  Object.ancestors     # [Object, Kernel]
  Kernel.ancestors     # [Kernel]
  </code></pre>
  
  <p>Is there any way to descend the hierarchy as well? I'd like to do this</p>
  
  <pre><code>Animal.descendants      # [Dog, Cat, Human, ...]
  Dog.descendants         # [Labrador, GreatDane, Airedale, ...]
  Enumerable.descendants  # [String, Array, ...]
  </code></pre>
  
  <p>but there doesn't seem to be a <code>descendants</code> method.</p>
  
  <p>(This question comes up because I want to find all the models in a Rails application that descend from a base class and list them; I have a controller that can work with any such model and I'd like to be able to add new models without having to modify the controller.)</p>