Class: Concurrent::Channel::Selector::ErrorClause

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

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ ErrorClause

Returns a new instance of ErrorClause.



7
8
9
# File 'lib/concurrent-ruby-edge/concurrent/channel/selector/error_clause.rb', line 7

def initialize(block)
  @block = block
end

Instance Method Details

#execute(error) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/concurrent-ruby-edge/concurrent/channel/selector/error_clause.rb', line 11

def execute(error)
  @block.call(error)
rescue
  # suppress and move on
ensure
  return nil
end