123456789_123456789_123456789_123456789_123456789_

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

Instance Method Summary

Constructor Details

.new(block) ⇒ DefaultClause

[ GitHub ]

  
# 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