Class: Sandals::EventDispatcher
- Inherits:
-
Object
- Object
- Sandals::EventDispatcher
- Defined in:
- lib/sandals/event_dispatcher.rb
Instance Method Summary collapse
- #dispatch(events) ⇒ Object
-
#initialize(controls) ⇒ EventDispatcher
constructor
A new instance of EventDispatcher.
Constructor Details
#initialize(controls) ⇒ EventDispatcher
Returns a new instance of EventDispatcher.
5 6 7 |
# File 'lib/sandals/event_dispatcher.rb', line 5 def initialize(controls) @controls = controls end |
Instance Method Details
#dispatch(events) ⇒ Object
9 10 11 |
# File 'lib/sandals/event_dispatcher.rb', line 9 def dispatch(events) events.each { |event| dispatch_event(event) } end |