Module: Seahorse::Client::EventEmitter

Defined in:
gems/aws-sdk-core/lib/seahorse/client/events.rb

Instance Method Summary collapse

Instance Method Details

#emit(event_name, *args, &block) ⇒ Object



12
13
14
15
# File 'gems/aws-sdk-core/lib/seahorse/client/events.rb', line 12

def emit(event_name, *args, &block)
  @listeners[event_name] ||= []
  @listeners[event_name] << block if block_given?
end

#initialize(*args) ⇒ Object



7
8
9
10
# File 'gems/aws-sdk-core/lib/seahorse/client/events.rb', line 7

def initialize(*args)
  @listeners = {}
  super
end

#signal(event, *args) ⇒ Object



17
18
19
# File 'gems/aws-sdk-core/lib/seahorse/client/events.rb', line 17

def signal(event, *args)
  @listeners
end