instance method
demodulize
Ruby on Rails 3.1.12
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/methods.rb, line 71
def demodulize(class_name_in_module)
class_name_in_module.to_s.gsub(/^.*::/, '')
end
Defined in activesupport/lib/active_support/inflector/methods.rb line 71
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Inflector