lib/em-ssh/callbacks.rb
# Signal that an event has occured.
# Each callback will receive whatever args are passed to fire, or the object that the event was fired upon.
# @param [Symbol] event
# @param [Objects] arguments to pass to all callbacks registered for the given event
# @param [Array] the results of each callback that was executed
Signal that an event has occured.
Each callback will receive whatever args are passed to fire, or the object that the event was fired upon.
Signal that an event has occured . Each callback will receive whatever args are passed to fire or the object that the event was fired upon .
def fire(event, *args)
        args = self if args.empty?
        (callbacks[event] ||= []).clone.map { |cb| cb.call(*args) }
      end
def fire ( event , * args ) args = self if args . empty? ( callbacks [ event ] ||= [ ] ) . clone . map { | cb | cb . call ( * args ) } end
Signal that an event has occured.
Signal that an event has occured .
#log.debug("#{self}.fire(#{event.inspect}, #{args})")
event
<not_specific>
args
<not_specific>
<not_specific>
the results of each callback that was executed
the results of each callback that was executed