diff options
author | Casey Dahlin <cdahlin@redhat.com> | 2008-10-10 10:33:58 -0400 |
---|---|---|
committer | Casey Dahlin <cdahlin@redhat.com> | 2008-10-10 10:33:58 -0400 |
commit | 3b01624e797184fc0e79fbf463bfdd4c3554f8cd (patch) | |
tree | 21feb9f9c5e1093a3d82e62d1a42142290d96e4e /state.rb | |
parent | 50415bdba2b379a9b320f05456cb0b4c9c363cef (diff) | |
download | upstate-3b01624e797184fc0e79fbf463bfdd4c3554f8cd.tar.gz upstate-3b01624e797184fc0e79fbf463bfdd4c3554f8cd.tar.xz upstate-3b01624e797184fc0e79fbf463bfdd4c3554f8cd.zip |
Add State::get_all method
State::get_all gets all states. When the receiver is a subclass of State it
returns all states of that type.
Diffstat (limited to 'state.rb')
-rw-r--r-- | state.rb | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -276,6 +276,11 @@ class State nil end + # Get all states of this type + def State.get_all + @@states.select{ |x| x.is_a? self } + end + # Depsolve all state classes. This method is not defined in subclasses of # State. def State.depsolve_all |