Sha256: 84716588e83beb5ec16bfa9c2b2b22acac02420cba0d114fd3f8b0c0edd1df76
Contents?: true
Size: 545 Bytes
Versions: 3
Compression:
Stored size: 545 Bytes
Contents
# Trace utility # # Consists in a Trace class, and a Trace global method module XRVG # Trace "static" class, to be able to globally inhibit or activate traces # Trace.inihibit # Trace.activate class Trace @@active = true def Trace.active? return @@active end def Trace.inhibit @@active = nil end def Trace.activate @@active = true end end # Standard trace method # Trace("hello world") # Check before printing the string if traces are active def Trace(string) if Trace.active? puts string end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
xrvg-0.0.4 | lib/trace.rb |
xrvg-0.0.5 | lib/trace.rb |
xrvg-0.0.6 | lib/trace.rb |