Flowdock
method

module_parent

Importance_1
v6.1.3.1 - Show latest stable - 0 notes - Class: Module
module_parent() public

Returns the module which contains this one according to its name.

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

M::N.module_parent # => M
X.module_parent    # => M

The parent of top-level and anonymous modules is Object.

M.module_parent          # => Object
Module.new.module_parent # => Object
Show source
Register or log in to add new notes.