Class: Concurrent::Channel::Selector::DefaultClause
- Inherits:
-
Object
- Object
- Concurrent::Channel::Selector::DefaultClause
- Defined in:
- lib-edge/concurrent/channel/selector/default_clause.rb
Instance Method Summary collapse
- #execute ⇒ undocumented
-
#initialize(block) ⇒ DefaultClause
constructor
A new instance of DefaultClause.
Constructor Details
#initialize(block) ⇒ DefaultClause
Returns a new instance of DefaultClause
9 10 11 |
# File 'lib-edge/concurrent/channel/selector/default_clause.rb', line 9 def initialize(block) @block = block end |
Instance Method Details
#execute ⇒ undocumented
13 14 15 |
# File 'lib-edge/concurrent/channel/selector/default_clause.rb', line 13 def execute Concurrent::Maybe.just(@block.call) end |