class String
def constantize
'blargle'.constantize # => NameError: wrong constant name blargle
'Class'.constantize # => Class
'Module'.constantize # => Module
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