Gem for defining and retrieving instances of a class