# File lib/god/task.rb, line 153 def lifecycle # Create a new metric to hold the task and conditions. m = Metric.new(self) # Let the config file define some conditions on the metric. yield(m) # Populate the condition -> metric directory. m.conditions.each do |c| self.directory[c] = m end # Record the metric. self.metrics[nil] << m end