method

module_parents

Importance_1
v7.1.3.4 - Show latest stable - 0 notes - Class: Module
module_parents() public

Returns all the parents of this module according to its name, ordered from nested outwards. The receiver is not contained within the result.

module M
  module N
  end
end
X = M::N

M.module_parents    # => [Object]
M::N.module_parents # => [M, Object]
X.module_parents    # => [M, Object]
Show source
Register or log in to add new notes.