instance method
demodulize
Ruby on Rails 3.1.12
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"
Source
# File activesupport/lib/active_support/core_ext/string/inflections.rb, line 97
def demodulize
ActiveSupport::Inflector.demodulize(self)
end
Defined in activesupport/lib/active_support/core_ext/string/inflections.rb line 97
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in String