class Byebug::ShowCommand

Show byebug settings.

Public Class Methods

description() click to toggle source
# File lib/byebug/commands/show.rb, line 29
def description
  prettify <<-EOD
    show <setting> <value>

    Generic command for showing byebug settings. You can change them with
    the "set" command.
  EOD
end
help(subcmd = nil) click to toggle source
# File lib/byebug/commands/show.rb, line 38
def help(subcmd = nil)
  Setting.help('show', subcmd)
end
names() click to toggle source
# File lib/byebug/commands/show.rb, line 25
def names
  %w(show)
end

Public Instance Methods

execute() click to toggle source
# File lib/byebug/commands/show.rb, line 14
def execute
  key = @match[:setting]
  return puts(self.class.help) if key.nil?

  setting = Setting.find(key)
  return errmsg(pr('show.errors.unknown_setting', key: key)) unless setting

  puts Setting.settings[setting.to_sym]
end
regexp() click to toggle source
# File lib/byebug/commands/show.rb, line 10
def regexp
  /^\s* show (?:\s+(?<setting>\w+))? \s*$/x
end