class String

def demodulize

See also +deconstantize+.

See ActiveSupport::Inflector.demodulize.

''.demodulize # => ''
'::Inflections'.demodulize # => "Inflections"
'Inflections'.demodulize # => "Inflections"
'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections"

Removes the module part from the constant expression in the string.
def demodulize
  ActiveSupport::Inflector.demodulize(self)
end