Module: WDD::Utils::SimpleDebug
- Defined in:
- lib/wdd-ruby-ext/utils/simpledebug.rb
Instance Method Summary collapse
- #__debugLevel ⇒ Object
- #debug_msg(message, level = 0) ⇒ Object
- #debugLevel ⇒ Object
- #debugPrefix ⇒ Object
- #error_msg(message, level = 0) ⇒ Object
- #set_debug_level(level) ⇒ Object
- #setDebugLevel(level) ⇒ Object
- #setDebugPrefix(__prefix) ⇒ Object
- #show_msg(message) ⇒ Object
Instance Method Details
#__debugLevel ⇒ Object
27 28 29 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 27 def __debugLevel return @__debugLevel end |
#debug_msg(message, level = 0) ⇒ Object
35 36 37 38 39 40 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 35 def debug_msg , level=0 @__debugLevel ||= -1 if( level <= @__debugLevel ) puts debugPrefix + end end |
#debugLevel ⇒ Object
31 32 33 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 31 def debugLevel @__debugLevel end |
#debugPrefix ⇒ Object
19 20 21 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 19 def debugPrefix @__prefix || "" end |
#error_msg(message, level = 0) ⇒ Object
46 47 48 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 46 def error_msg , level=0 puts debugPrefix + "ERROR: " + end |
#set_debug_level(level) ⇒ Object
23 24 25 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 23 def set_debug_level level @__debugLevel = level end |
#setDebugLevel(level) ⇒ Object
11 12 13 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 11 def setDebugLevel level @__debugLevel = level end |
#setDebugPrefix(__prefix) ⇒ Object
15 16 17 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 15 def setDebugPrefix __prefix @__prefix = __prefix end |
#show_msg(message) ⇒ Object
42 43 44 |
# File 'lib/wdd-ruby-ext/utils/simpledebug.rb', line 42 def show_msg puts debugPrefix + end |