# File lib/god/task.rb, line 421 def handle_event(condition) # Lookup metric. metric = self.directory[condition] # Log. messages = self.log_line(self, metric, condition, true) # Notify. if condition.notify self.notify(condition, messages.last) end # Get the destination. dest = if condition.transition # Condition override. condition.transition else # Regular. metric.destination && metric.destination[true] end if dest self.move(dest) end end