From bc5e3bb025d247629b7175f9676d3a2da765142d Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Fri, 10 Oct 2008 10:54:42 -0400 Subject: Get caused_by from class in State#react_to? State#react_to? was looking for an instance variable that was really a class attribute. --- state.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'state.rb') diff --git a/state.rb b/state.rb index d8f6458..f476401 100644 --- a/state.rb +++ b/state.rb @@ -69,7 +69,7 @@ class State # Returns true if this state should be raised if +event+ is occuring def react_to?(event) return false if @status != :down - @caused_by.each do |x| + self.class.caused_by.each do |x| return true if x === event end return false -- cgit