Method: Ably::Modules::EventEmitter#once

Defined in:
lib/ably/modules/event_emitter.rb

#once(*event_names, &block) ⇒ void

This method returns an undefined value.

On receiving an event maching the event_name, call the provided block only once and remove the registered callback



68
69
70
# File 'lib/ably/modules/event_emitter.rb', line 68

def once(*event_names, &block)
  add_callback event_names, proc_for_block(block, delete_once_run: true)
end