Class: God::PollCondition

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

Instance Attribute Summary collapse

Attributes inherited from Behavior

#watch

Instance Method Summary collapse

Methods inherited from Condition

generate

Methods inherited from Behavior

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

Instance Attribute Details

#intervalObject

all poll conditions can specify a poll interval



24
25
26
# File 'lib/god/condition.rb', line 24

def interval
  @interval
end

Instance Method Details

#afterObject

Override this method in your Conditions (optional)



39
40
# File 'lib/god/condition.rb', line 39

def after
end

#beforeObject

Override this method in your Conditions (optional)



27
28
# File 'lib/god/condition.rb', line 27

def before
end

#testObject

Override this method in your Conditions (mandatory)

Return true if the test passes (everything is ok) Return false otherwise



34
35
36
# File 'lib/god/condition.rb', line 34

def test
  raise AbstractMethodNotOverriddenError.new("Condition#test must be overridden in subclasses")
end