Class: Evey::Dispatcher::ReactorSet
- Inherits:
-
Object
- Object
- Evey::Dispatcher::ReactorSet
- Defined in:
- lib/evey/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.
83 84 85 86 |
# File 'lib/evey/dispatcher.rb', line 83 def initialize @sync = Set.new @async = Set.new end |
Instance Attribute Details
#async ⇒ Object (readonly)
Returns the value of attribute async.
81 82 83 |
# File 'lib/evey/dispatcher.rb', line 81 def async @async end |
#sync ⇒ Object (readonly)
Returns the value of attribute sync.
81 82 83 |
# File 'lib/evey/dispatcher.rb', line 81 def sync @sync end |
Instance Method Details
#add_async(reactors) ⇒ Object
92 93 94 |
# File 'lib/evey/dispatcher.rb', line 92 def add_async(reactors) @async += reactors end |
#add_sync(reactors) ⇒ Object
88 89 90 |
# File 'lib/evey/dispatcher.rb', line 88 def add_sync(reactors) @sync += reactors end |