Class: Emit::InputGuard
- Inherits:
-
Object
- Object
- Emit::InputGuard
- Defined in:
- lib/emit/input_guard.rb
Instance Attribute Summary collapse
-
#guard_action ⇒ Object
readonly
Returns the value of attribute guard_action.
Instance Method Summary collapse
-
#initialize(channel_end, action = nil) ⇒ InputGuard
constructor
A new instance of InputGuard.
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_action ⇒ Object (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 |