Class: Emit::InputGuard

Inherits:
Object
  • Object
show all
Defined in:
lib/emit/input_guard.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_end, action = nil) ⇒ InputGuard

Returns a new instance of InputGuard.



5
6
7
8
9
10
11
# File 'lib/emit/input_guard.rb', line 5

def initialize(channel_end, action=nil)
  if ChannelEndRead === channel_end
    @guard_action = [channel_end, action]
  else
    fail "InputGuard must have a reading channel end."
  end
end

Instance Attribute Details

#guard_actionObject (readonly)

Returns the value of attribute guard_action.



3
4
5
# File 'lib/emit/input_guard.rb', line 3

def guard_action
  @guard_action
end