Class: God::TriggerCondition

Inherits:
Condition show all
Defined in:
lib/god/condition.rb

Direct Known Subclasses

Conditions::Flapping

Instance Attribute Summary

Attributes inherited from Condition

#info, #notify, #phase, #transition

Attributes inherited from Behavior

#watch

Instance Method Summary collapse

Methods inherited from Condition

#friendly_name, generate, valid?

Methods inherited from Behavior

#after_restart, #after_start, #after_stop, #before_restart, #before_start, #before_stop, #friendly_name, generate, #valid?

Methods included from Configurable

#base_name, #complain, complain, #friendly_name, #prepare, #reset, #valid?

Instance Method Details

#deregisterObject



91
92
93
# File 'lib/god/condition.rb', line 91

def deregister
  Trigger.deregister(self)
end

#process(event, payload) ⇒ Object



79
80
81
# File 'lib/god/condition.rb', line 79

def process(event, payload)
  raise AbstractMethodNotOverriddenError.new("TriggerCondition#process must be overridden in subclasses")
end

#registerObject



87
88
89
# File 'lib/god/condition.rb', line 87

def register
  Trigger.register(self)
end

#triggerObject



83
84
85
# File 'lib/god/condition.rb', line 83

def trigger
  self.watch.trigger(self)
end