Class: Smith::Events::Scope
- Inherits:
-
Object
- Object
- Smith::Events::Scope
- Defined in:
- lib/smith/events/bus.rb
Instance Method Summary collapse
- #cancel_all ⇒ Object
-
#initialize ⇒ Scope
constructor
A new instance of Scope.
- #on(event_class) ⇒ Object
Constructor Details
#initialize ⇒ Scope
Returns a new instance of Scope.
6 7 8 |
# File 'lib/smith/events/bus.rb', line 6 def initialize @handles = [] end |
Instance Method Details
#cancel_all ⇒ Object
16 17 18 |
# File 'lib/smith/events/bus.rb', line 16 def cancel_all @handles.each(&:cancel) end |