Class: Byebug::ShowCommand
Overview
Instance Attribute Summary
Attributes inherited from Command
#processor
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
#arguments, columnize, #context, #frame, #initialize, match, to_s
#camelize, #prettify
Class Method Details
.description ⇒ Object
15
16
17
18
19
20
21
22
23
|
# File 'lib/byebug/commands/show.rb', line 15
def self.description
<<-EOD
show <setting> <value>
#{short_description}
You can change them with the "set" command.
EOD
end
|
.help ⇒ Object
29
30
31
|
# File 'lib/byebug/commands/show.rb', line 29
def self.help
super + Setting.help_all
end
|
.regexp ⇒ Object
11
12
13
|
# File 'lib/byebug/commands/show.rb', line 11
def self.regexp
/^\s* show (?:\s+(?<setting>\w+))? \s*$/x
end
|
.short_description ⇒ Object
25
26
27
|
# File 'lib/byebug/commands/show.rb', line 25
def self.short_description
'Shows byebug settings'
end
|
Instance Method Details
#execute ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/byebug/commands/show.rb', line 33
def execute
key = @match[:setting]
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
|