def ancestors_until(until_class)
        # trim down the list
        ancestors_list = all_ancestors[0..all_ancestors.index(until_class)]

        # map to the fully qualified class name
        ancestors_list.map { |klass| yield(klass) }
      end
def ancestors_until(until_class)
        # trim down the list
        ancestors_list = all_ancestors[0..all_ancestors.index(until_class)]

        # map to the fully qualified class name
        ancestors_list.map { |klass| yield(klass) }
      end
The list of ancestors is very long.
 Trim it down to just the length of the class we are looking for.

 Takes an optional block method to transform the result
 with a map operation