lib/byebug/commands/show.rb in byebug-4.0.5 vs lib/byebug/commands/show.rb in byebug-5.0.0
- old
+ new
@@ -11,33 +11,27 @@
/^\s* show (?:\s+(?<setting>\w+))? \s*$/x
end
def execute
key = @match[:setting]
- return puts(self.class.help) if key.nil?
+ return puts(help) unless key
setting = Setting.find(key)
return errmsg(pr('show.errors.unknown_setting', key: key)) unless setting
puts Setting.settings[setting.to_sym]
end
- class << self
- def names
- %w(show)
- end
+ def help
+ description + Setting.help_all
+ end
- def description
- prettify <<-EOD
- show <setting> <value>
+ def description
+ <<-EOD
+ show <setting> <value>
- Generic command for showing byebug settings. You can change them with
- the "set" command.
- EOD
- end
-
- def help(subcmd = nil)
- Setting.help('show', subcmd)
- end
+ Generic command for showing byebug settings. You can change them with
+ the "set" command.
+ EOD
end
end
end