Given the following Ruby code, and given I have an instance of Klass, how can I call the do_stuff method on my Klass instance. I want to cast my Klass instance to Subklass. I understand type-casting this is not possible in Ruby - is there a way to fake it?
class Klass
...
end
class Subklass < Klass
...
def do_stuff
...
end
end
inst = Klass.new
inst.magically_convert_to_subklass_instance # Need help here
inst.do_stuff