Sha256: 4ccd4e5a130ebf0f5ce9c0124556374ce2b1e79ef53000a2d55de2a1dd46e350
Contents?: true
Size: 592 Bytes
Versions: 1
Compression:
Stored size: 592 Bytes
Contents
module MfDebugger extend self class Logger class << self attr_accessor :debug_on @debug_on = false end def self.log(msg, &block) if block_given? block.call end STDOUT.puts '*'*5 + msg.to_s end def self.debug(msg, &block) if MfDebugger::Logger.debug_on if block_given? log(msg,&block) else log(msg) end end end end def mf_debug(msg,&block) MfDebugger::Logger.debug(msg, &block) end def mf_log(msg,&block) MfDebugger::Logger.log(msg, &block) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
metric_fu-4.2.1 | lib/metric_fu/logging/mf_debugger.rb |