How do I call a class from a string containing that class name inside of it? (I guess I could do case/when but that seems ugly.)
The reason I ask is because I\'m us
When ActiveSupport is available (e.g. in Rails): String#constantize or String#safe_constantize, that is "ClassName".constantize.
In pure Ruby: Module#const_get, typically Object.const_get("ClassName").
In recent rubies, both work with constants nested in modules, like in Object.const_get("Outer::Inner").