diff options
| author | Casey Dahlin <cdahlin@redhat.com> | 2008-10-07 10:27:12 -0400 |
|---|---|---|
| committer | Casey Dahlin <cdahlin@redhat.com> | 2008-10-07 10:27:12 -0400 |
| commit | 4578965df38401a58fb7573ab5f33ef0600dbd67 (patch) | |
| tree | 391ffa124ce625bb75931be0e8b15fbd3c26c169 | |
| parent | f694d2f5240cbc847b0f765ee5d8e76f71d7f814 (diff) | |
| download | upstate-4578965df38401a58fb7573ab5f33ef0600dbd67.tar.gz upstate-4578965df38401a58fb7573ab5f33ef0600dbd67.tar.xz upstate-4578965df38401a58fb7573ab5f33ef0600dbd67.zip | |
Added trace method
Added a new trace method to output debuginfo
| -rw-r--r-- | state.rb | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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. |
