Class: Emit::GuardGuard

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel_end, message, action = nil) ⇒ GuardGuard

Returns a new instance of GuardGuard.



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

def initialize(channel_end, message, action=nil)
  if ChannelEndWrite === channel_end
    @guard_action = [channel_end, message, action]
  else
    fail "OutputGuard must have a writing channel end."
  end
end

Instance Attribute Details

#guard_actionObject (readonly)

Returns the value of attribute guard_action.



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

def guard_action
  @guard_action
end