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



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

def interval
  @interval
end

Instance Method Details

#afterObject

Override this method in your Conditions (optional)



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

def after
end

#beforeObject

Override this method in your Conditions (optional)



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

def before
end

#testObject

Override this method in your Conditions (mandatory)

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



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

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