Class List Method List File List

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

Inherits:
  Object
  - Object
  - Concurrent::Channel::Selector::DefaultClause
  show all
Defined in:
  lib/concurrent/channel/selector/default_clause.rb

## Instance Method Summary (collapse)

- - (undocumented) execute
- - (DefaultClause) initialize(block) constructor

  A new instance of DefaultClause.

## Constructor Details

### - (`DefaultClause`) initialize(block)

Returns a new instance of DefaultClause

    9
    10
    11

    # File 'lib/concurrent/channel/selector/default_clause.rb', line 9

    def initialize(block)
      @block = block
    end

## Instance Method Details

### - (`undocumented`) execute

    13
    14
    15

    # File 'lib/concurrent/channel/selector/default_clause.rb', line 13

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