module Ethon::Easy::ResponseCallbacks

This module contains the logic for the response callbacks. The on_complete callback is the only one at the moment.

You can set multiple callbacks, which are then executed in the same order.

easy.on_complete { p 1 }
easy.on_complete { p 2 }
easy.complete
#=> 1
#=> 2

You can clear the callbacks:

easy.on_complete { p 1 }
easy.on_complete { p 2 }
easy.on_complete.clear
easy.on_complete
#=> []