class Byebug::UntracevarCommand

Stop tracing a global variable.

Public Class Methods

description() click to toggle source
# File lib/byebug/commands/untracevar.rb, line 12
def self.description
  <<-EOD
    untr[acevar] <variable>

    #{short_description}
  EOD
end
regexp() click to toggle source
# File lib/byebug/commands/untracevar.rb, line 8
def self.regexp
  /^\s* untr(?:acevar)? (?:\s+ (\S+))? \s*$/x
end
short_description() click to toggle source
# File lib/byebug/commands/untracevar.rb, line 20
def self.short_description
  'Stops tracing a global variable'
end

Public Instance Methods

execute() click to toggle source
# File lib/byebug/commands/untracevar.rb, line 24
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