Class: Byebug::UntracevarCommand
- Defined in:
- lib/byebug/commands/untracevar.rb
Overview
Stop tracing a global variable.
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
#arguments, columnize, #context, #frame, help, #initialize, match, to_s
Methods included from Helpers::StringHelper
#camelize, #deindent, #prettify
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/byebug/commands/untracevar.rb', line 14 def self.description <<-DESCRIPTION untr[acevar] <variable> #{short_description} DESCRIPTION end |
.regexp ⇒ Object
10 11 12 |
# File 'lib/byebug/commands/untracevar.rb', line 10 def self.regexp /^\s* untr(?:acevar)? (?:\s+ (\S+))? \s*$/x end |
.short_description ⇒ Object
22 23 24 |
# File 'lib/byebug/commands/untracevar.rb', line 22 def self.short_description "Stops tracing a global variable" end |
Instance Method Details
#execute ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/byebug/commands/untracevar.rb', line 26 def execute var = @match[1] if global_variables.include?(:"#{var}") untrace_var(:"#{var}") puts pr("trace.messages.undo", var: var) else errmsg pr("trace.errors.not_global", var: var) end end |