Class: Concurrent::Channel::Selector::DefaultClause
- Inherits:
-
Object
- Object
- Concurrent::Channel::Selector::DefaultClause
- Defined in:
- lib/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#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/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb', line 9 def initialize(block) @block = block end |
Instance Method Details
#execute ⇒ Object
13 14 15 |
# File 'lib/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb', line 13 def execute Concurrent::Maybe.just(@block.call) end |