Class: Eventsimple::EventDispatcher::ReactorSet
- Inherits:
-
Object
- Object
- Eventsimple::EventDispatcher::ReactorSet
- Defined in:
- lib/eventsimple/event_dispatcher.rb
Overview
Contains sync and async reactors. Used to:
-
store reactors via Rules#register
-
return a set of matching reactors with Rules#for
Instance Attribute Summary collapse
-
#async ⇒ Object
readonly
Returns the value of attribute async.
-
#sync ⇒ Object
readonly
Returns the value of attribute sync.
Instance Method Summary collapse
- #add_async(reactors) ⇒ Object
- #add_sync(reactors) ⇒ Object
-
#initialize ⇒ ReactorSet
constructor
A new instance of ReactorSet.
Constructor Details
#initialize ⇒ ReactorSet
Returns a new instance of ReactorSet.
80 81 82 83 |
# File 'lib/eventsimple/event_dispatcher.rb', line 80 def initialize @sync = [] @async = [] end |
Instance Attribute Details
#async ⇒ Object (readonly)
Returns the value of attribute async.
78 79 80 |
# File 'lib/eventsimple/event_dispatcher.rb', line 78 def async @async end |
#sync ⇒ Object (readonly)
Returns the value of attribute sync.
78 79 80 |
# File 'lib/eventsimple/event_dispatcher.rb', line 78 def sync @sync end |
Instance Method Details
#add_async(reactors) ⇒ Object
89 90 91 |
# File 'lib/eventsimple/event_dispatcher.rb', line 89 def add_async(reactors) @async |= reactors end |
#add_sync(reactors) ⇒ Object
85 86 87 |
# File 'lib/eventsimple/event_dispatcher.rb', line 85 def add_sync(reactors) @sync |= reactors end |