instance method
demodulize
Ruby on Rails 8.0.4
Since v3.0.20Signature
demodulize()
Removes the module part from the constant expression in the string.
'ActiveSupport::Inflector::Inflections'.demodulize # => "Inflections" 'Inflections'.demodulize # => "Inflections" '::Inflections'.demodulize # => "Inflections" ''.demodulize # => ''
See ActiveSupport::Inflector.demodulize.
See also deconstantize.
Source
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 162
def demodulize
ActiveSupport::Inflector.demodulize(self)
end
Defined in activesupport/lib/active_support/core_ext/string/inflections.rb line 162
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String