instance method
demodulize
Ruby on Rails 2.2.3
Since v2.2.3Signature
demodulize(class_name_in_module)
Removes the module part from the expression in the string.
Examples:
"ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" "Inflections".demodulize # => "Inflections"
Parameters
-
class_name_in_modulereq
Source
# File activesupport/lib/active_support/inflector.rb, line 240
def demodulize(class_name_in_module)
class_name_in_module.to_s.gsub(/^.*::/, '')
end
Defined in activesupport/lib/active_support/inflector.rb line 240
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector