
Wyatt G. answered 12/24/20
Tutor
New to Wyzant
Software Engineer and Architect Specializing in Ruby on Rails
result.class.name is what you want.
Here's the documentation for the name method: https://ruby-doc.org/core-2.7.1/Module.html#method-i-name Class inherits the name method from Module.
Keep in mind that namespaces are part of the name, too:
module Continents
class Europe
end
end
europe = Continents::Europe.new
europe.class.name # => "Continents::Europe"