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