Class: Concurrent::Channel::Selector::DefaultClause
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb |
Class Method Summary
- .new(block) ⇒ DefaultClause constructor
Instance Method Summary
Constructor Details
.new(block) ⇒ DefaultClause
# File 'lib/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb', line 9
def initialize(block) @block = block end
Instance Method Details
#execute
[ GitHub ]# File 'lib/concurrent-ruby-edge/concurrent/channel/selector/default_clause.rb', line 13
def execute Concurrent::Maybe.just(@block.call) end