class A
def bar
B.new.foo
end
end
class B
def foo
#Here
"HELLO WORLD!"
end
end
A.new.bar
Inside B#foo,
how can I find the class A or any other reference or class name.
Basically from which class it was called.
I tried something like this:
self.class
#B
self.class.superclass
#Object