Class: Concurrent::Channel::Selector::DefaultClause

Inherits:
Object
  • Object
show all
Defined in:
lib-edge/concurrent/channel/selector/default_clause.rb

Instance Method Summary collapse

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

#executeundocumented



13
14
15
# File 'lib-edge/concurrent/channel/selector/default_clause.rb', line 13

def execute
  Concurrent::Maybe.just(@block.call)
end