module Ethon::Easy::ResponseCallbacks

def complete

Other tags:
    Example: Execute on_completes. -
def complete
  if defined?(@on_complete)
    @on_complete.map{ |callback| callback.call(self) }
  end
end

def on_complete(&block)

Parameters:
  • 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