class String

def constantize

"Class".constantize # => Class
"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