Class: God::PollCondition
- Defined in:
- lib/god/condition.rb
Direct Known Subclasses
Conditions::Always, Conditions::CpuUsage, Conditions::Lambda, Conditions::MemoryUsage, Conditions::ProcessRunning
Instance Attribute Summary collapse
-
#interval ⇒ Object
all poll conditions can specify a poll interval.
Attributes inherited from Behavior
Instance Method Summary collapse
-
#after ⇒ Object
Override this method in your Conditions (optional).
-
#before ⇒ Object
Override this method in your Conditions (optional).
-
#test ⇒ Object
Override this method in your Conditions (mandatory).
Methods inherited from Condition
Methods inherited from Behavior
#after_restart, #after_start, #after_stop, #before_restart, #before_start, #before_stop, generate, #prepare, #valid?
Instance Attribute Details
#interval ⇒ Object
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
#after ⇒ Object
Override this method in your Conditions (optional)
39 40 |
# File 'lib/god/condition.rb', line 39 def after end |
#before ⇒ Object
Override this method in your Conditions (optional)
27 28 |
# File 'lib/god/condition.rb', line 27 def before end |
#test ⇒ Object
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 |