例如,我该如何实现以下内容:
class A
def initialize
b = B.new
end
end
class B
def initialize
puts #how can I find out who instantiated me
end
end
例如,我该如何实现以下内容:
class A
def initialize
b = B.new
end
end
class B
def initialize
puts #how can I find out who instantiated me
end
end