disable

trace.disable â true or false
trace.disable { block } â obj
Instance Public methods

Deactivates the trace

Return true if trace was enabled. Return false if trace was disabled.

trace.enabled?       #=> true
trace.disable        #=> false (previous status)
trace.enabled?       #=> false
trace.disable        #=> false

If a block is given, the trace will only be disable within the scope of the block.

trace.enabled?
#=> true

trace.disable do
    trace.enabled?
    # only disabled for this block
end

trace.enabled?
#=> true

Note: You cannot access event hooks within the block.

trace.disable { p tp.lineno }
#=> RuntimeError: access from outside
doc_ruby_on_rails
2015-06-09 17:29:53
Comments
Leave a Comment

Please login to continue.