module Ethon::Easy::ResponseCallbacks
def complete
- Example: Execute on_completes. -
def complete if defined?(@on_complete) @on_complete.map{ |callback| callback.call(self) } end end
def on_complete(&block)
-
block
(Block
) -- The block to execute.
Other tags:
- Example: Set on_complete. -
def on_complete(&block) @on_complete ||= [] @on_complete << block if block_given? @on_complete end