From 4578965df38401a58fb7573ab5f33ef0600dbd67 Mon Sep 17 00:00:00 2001 From: Casey Dahlin Date: Tue, 7 Oct 2008 10:27:12 -0400 Subject: Added trace method Added a new trace method to output debuginfo --- state.rb | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- cgit