trace.enable â true or false
trace.enable { block } â obj
trace.enable { block } â obj
Instance Public methods
Activates the trace
Return true if trace was enabled. Return false if trace was disabled.
trace.enabled? #=> false trace.enable #=> false (previous state) # trace is enabled trace.enabled? #=> true trace.enable #=> true (previous state) # trace is still enabled
If a block is given, the trace will only be enabled within the scope of the block.
trace.enabled? #=> false trace.enable do trace.enabled? # only enabled for this block end trace.enabled? #=> false
Note: You cannot access event hooks within the block.
trace.enable { p tp.lineno } #=> RuntimeError: access from outside
Please login to continue.