Class: God::Conditions::Always

Inherits:
PollCondition show all
Defined in:
lib/god/conditions/always.rb

Instance Attribute Summary collapse

Attributes inherited from PollCondition

#interval

Attributes inherited from Behavior

#watch

Instance Method Summary collapse

Methods inherited from PollCondition

#after, #before

Methods inherited from God::Condition

generate

Methods inherited from Behavior

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

Instance Attribute Details

#whatObject

Returns the value of attribute what.



5
6
7
# File 'lib/god/conditions/always.rb', line 5

def what
  @what
end

Instance Method Details

#testObject



13
14
15
# File 'lib/god/conditions/always.rb', line 13

def test
  @what
end

#valid?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/god/conditions/always.rb', line 7

def valid?
  valid = true
  valid &= complain("You must specify the 'what' attribute for :always") if self.what.nil?
  valid
end