So I am working on some metaprograming and have some questions about
how to get what I need out of dynamic classes.

Right now I know I can define dynamic classes like so:
a) TestClass = Class.new
b) var_class = Class.new

These work as expected but I need the functionality provided by case
A. Specifically I need to have the instances respond to .class
appropriately. .class for case B returns Class, while case A responds
TestClass

The reason I need to do this is that I want to dynamically generate
classes, including their names. How can I accomplish this?

My desired results:

variable = Class.new
variable.class.name == 'variable'

OR, I need to be able to assign a dynamic constant name (I know I
know).

Any help would be appreciated.