parent_name()
Returns the name of the module containing this one.
M::N.parent_name # => "M"
# File activesupport/lib/active_support/core_ext/module/introspection.rb, line 7 def parent_name if defined? @parent_name @parent_name else @parent_name = name =~ /::[^:]+\Z/ ? $`.freeze : nil end end