Make class loading 1.9 compatible

Previously, the strategy used to load classes was Ruby 2.0 or greater.
This change uses a different strategy, taken from Ruby on Rails, to
turn a String into a constant and then instantiates it.

[#49693913]
Merge 49693913-main-class to master

[Completes #49693913]