Return the module which contains this one; if this is a root module, such as +::MyModule+, then Object is returned.
Source Code
# File active_support/core_ext/module/introspection.rb, line 4 def parent parent_name = name.split('::')[0..-2] * '::' parent_name.empty? ? Object : parent_name.constantize end
<code/>and<pre/>for code samples.