Class: God::Conditions::Always
- Inherits:
-
PollCondition
- Object
- Behavior
- God::Condition
- PollCondition
- God::Conditions::Always
- Defined in:
- lib/god/conditions/always.rb
Instance Attribute Summary collapse
-
#what ⇒ Object
Returns the value of attribute what.
Attributes inherited from PollCondition
Attributes inherited from God::Condition
#info, #notify, #phase, #transition
Attributes inherited from Behavior
Instance Method Summary collapse
-
#initialize ⇒ Always
constructor
A new instance of Always.
- #test ⇒ Object
- #valid? ⇒ Boolean
Methods inherited from PollCondition
Methods inherited from God::Condition
#friendly_name, generate, valid?
Methods inherited from Behavior
#after_restart, #after_start, #after_stop, #before_restart, #before_start, #before_stop, #friendly_name, generate
Methods included from God::Configurable
#base_name, complain, #complain, #friendly_name, #prepare, #reset
Constructor Details
#initialize ⇒ Always
Returns a new instance of Always.
7 8 9 |
# File 'lib/god/conditions/always.rb', line 7 def initialize self.info = "always" end |
Instance Attribute Details
#what ⇒ Object
Returns the value of attribute what.
5 6 7 |
# File 'lib/god/conditions/always.rb', line 5 def what @what end |
Instance Method Details
#test ⇒ Object
17 18 19 |
# File 'lib/god/conditions/always.rb', line 17 def test @what end |
#valid? ⇒ Boolean
11 12 13 14 15 |
# File 'lib/god/conditions/always.rb', line 11 def valid? valid = true valid &= complain("Attribute 'what' must be specified", self) if self.what.nil? valid end |