Method: Agent::Selector#case

Defined in:
lib/agent/selector.rb

#case(chan, direction, value = nil, &blk) ⇒ Object



45
46
47
48
49
# File 'lib/agent/selector.rb', line 45

def case(chan, direction, value=nil, &blk)
  raise "invalid case, must be a channel" unless chan.is_a?(Channel)
  raise Errors::InvalidDirection if direction != :send && direction != :receive
  add_case(chan, direction, value, &blk)
end