class String
def constantize
"Module".constantize # => Module
Examples
or is not initialized.
in the string. It raises a NameError when the name is not in CamelCase
+constantize+ tries to find a declared constant with the name specified
def constantize ActiveSupport::Inflector.constantize(self) end