Return all the parents of this module, ordered from nested outwards. The receiver is not contained within the result.
Source Code
# File active_support/core_ext/module/introspection.rb, line 11 def parents parents = [] parts = name.split('::')[0..-2] until parts.empty? parents << (parts * '::').constantize parts.pop end parents << Object unless parents.include? Object parents end
<code/>and<pre/>for code samples.