How do I get the name of a Ruby class?
Here's the correct answer, extracted from comments by Daniel Rikowski and pseidemann. I'm tired of having to weed through comments to find the right answer...
If you use Rails (ActiveSupport):
result.class.name.demodulize
If you use POR (plain-ol-Ruby):
result.class.name.split('::').last
You want to call .name on the object's class:
result.class.name