summaryrefslogtreecommitdiffstats
path: root/state.rb
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-10-03 17:15:53 -0400
committerCasey Dahlin <cdahlin@redhat.com>2008-10-03 17:15:53 -0400
commitdc1cc9c4078603c89ec91432d12433d65fecc8eb (patch)
treecde2f1ba179b388968f92fa729735ba275b4bf89 /state.rb
parentf781921d50493a886d6b214af7b77ae293ee1a7d (diff)
downloadupstate-dc1cc9c4078603c89ec91432d12433d65fecc8eb.tar.gz
upstate-dc1cc9c4078603c89ec91432d12433d65fecc8eb.tar.xz
upstate-dc1cc9c4078603c89ec91432d12433d65fecc8eb.zip
Rename respond_to to react_to
respond_to? is an API method in ruby
Diffstat (limited to 'state.rb')
-rw-r--r--state.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/state.rb b/state.rb
index 9bc8e34..a7920ae 100644
--- a/state.rb
+++ b/state.rb
@@ -57,7 +57,7 @@ class State
end
# Returns true if this state should be raised if +event+ is occuring
- def respond_to?(event)
+ def react_to?(event)
return false if @active
@caused_by.each do |x|
return true if x === event
@@ -175,7 +175,7 @@ class State
raise TypeError unless event.is_a? Event
count = 0
@@states.select{ |x| x.active }.each do
- next unless x.respond_to? event
+ next unless x.react_to? event
x.hold(:system)
count += 1
end