summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--state.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/state.rb b/state.rb
index 951c259..b842184 100644
--- a/state.rb
+++ b/state.rb
@@ -21,6 +21,13 @@ module UpState
# Occurs when the state machine becomes inconsistent
class ConsistencyFault < StandardError; end
+ENABLE_TRACE = false
+
+def trace(*args)
+ return unless ENABLE_TRACE
+ $stderr.puts *args
+end
+
=begin rdoc
An instance of State exists whenever a state can become true without having to
toggle any other states, or whenever a state _is_ true.