F
Francis Hwang
Is there a way for an inner class to find out what class owns it? The
code I'd like to use looks like:
class AbstractInnerClass
def do_something
# here's where I need to find the owner of the concrete child
end
end
class OuterClass
class ConcreteInnerClass < AbstractInnerClass
end
end
I'd love to be able to call ConcreteInnerClass#do_something and know
that it can find OuterClass. Is there a way for me to do this?
Francis
code I'd like to use looks like:
class AbstractInnerClass
def do_something
# here's where I need to find the owner of the concrete child
end
end
class OuterClass
class ConcreteInnerClass < AbstractInnerClass
end
end
I'd love to be able to call ConcreteInnerClass#do_something and know
that it can find OuterClass. Is there a way for me to do this?
Francis