4 def self.generate(kind)
5 sym = kind.to_s.capitalize.gsub(/_(.)/){$1.upcase}.intern
6 God::Conditions.const_get(sym).new
8 raise NoSuchConditionError.new("No Condition found with the class name God::Conditions::#{sym}")
11 # Override this method in your Conditions (optional)
13 # Called once after the Condition has been sent to the block and attributes have been
14 # set. Do any post-processing on attributes here
19 # Override this method in your Conditions (optional)
21 # Called once during evaluation of the config file.
22 # If invalid attributes are found, use #complain('text') to print out the error message
27 # Override this method in your Conditions (optional)
31 # Override this method in your Conditions (mandatory)
33 # Return true if the test passes (everything is ok)
34 # Return false otherwise
36 raise AbstractMethodNotOverriddenError.new("Condition#test must be overridden in subclasses")
39 # Override this method in your Conditions (optional)