I am looking at this answer to monkey-patch https://stackoverflow.com/a/21446021.
In this example the gem (someone else's library) has the method someMethod() which will eventually call the method I patched.
My app looks like this
activeRecord = ... # gets an ActiveRecord object that I want to update
options = {..}
@gem_object = SomeLibrary::Class.new(options)
@gem_object.someMethod()
Now someMethod() is going to eventually call the patched method. I want to make the patched method aware of activeRecord so it can update it. I am wondering if I can avoid adding activeRecord as a parameter to all the methods in the stack-trace when someMethod() is called.