The basic idea here is to have your callbacks setup through a method call and not sent as an argument to the method. You can then have these callbacks adapt depending on the other parameters sent through the method. After the method had been executed, it is deleted from the hash.
class Test
def setup_callbacks
callback.hello do |string|
puts string
end
end
def request
setup_callbacks
callback.hello('Hello World')
end
end
Test.new.request
Why delete the method?