I would like to check when running a method, if it was called from a different method.
EX:
def method1(foo)
if # foo previous method == method2
#code
elsif # foo previous method == method 3
#code
end
end
def method2
method1(foo)
end
is there a way to do this?