Class: God::PollCondition

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

Instance Attribute Summary collapse

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 Attribute Details

#intervalObject

all poll conditions can specify a poll interval



50
51
52
# File 'lib/god/condition.rb', line 50

def interval
  @interval
end

Instance Method Details

#afterObject

Override this method in your Conditions (optional)



65
66
# File 'lib/god/condition.rb', line 65

def after
end

#beforeObject

Override this method in your Conditions (optional)



53
54
# File 'lib/god/condition.rb', line 53

def before
end

#testObject

Override this method in your Conditions (mandatory)

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



60
61
62
# File 'lib/god/condition.rb', line 60

def test
  raise AbstractMethodNotOverriddenError, 'PollCondition#test must be overridden in subclasses'
end