summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2008-12-10 16:03:22 -0500
committerCasey Dahlin <cdahlin@redhat.com>2008-12-10 16:03:22 -0500
commit5c3a7bf109e55ecae2664032bce47506db36d9a7 (patch)
tree184e63cce50601ba17bb97fa432414ab39b18a1b
parent3e7dc13a9c298bdcbeac29071aef1339bba6e04f (diff)
downloadupstate-5c3a7bf109e55ecae2664032bce47506db36d9a7.tar.gz
upstate-5c3a7bf109e55ecae2664032bce47506db36d9a7.tar.xz
upstate-5c3a7bf109e55ecae2664032bce47506db36d9a7.zip
Add a method to print all states in color
-rw-r--r--state.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/state.rb b/state.rb
index f1387a7..e971843 100644
--- a/state.rb
+++ b/state.rb
@@ -264,6 +264,13 @@ class State
nil
end
+ # Print color string reps of all states
+ def State.print_all_color
+ @@states.each do |s|
+ puts s.to_s_color if s.is_a? self
+ end
+ end
+
# Look at the list of active states and see how the deps of this state could
# be met
def State.depsolve