more diagnostics
[god.git] / lib / god / conditions / always.rb
blobf651863ae0f59ef3bea781b94ef8e89c4ac8fc47
1 module God
2   module Conditions
4     class Always < PollCondition
5       attr_accessor :what
6       
7       def initialize
8         self.info = "always"
9       end
10       
11       def valid?
12         valid = true
13         valid &= complain("Attribute 'what' must be specified", self) if self.what.nil?
14         valid
15       end
16       
17       def test
18         @what
19       end
20     end
21   
22   end
23 end