Class: Byebug::VarClassCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::VarClassCommand
show all
- Defined in:
- lib/byebug/commands/variables.rb
Overview
Implements byebug’s ‘var class’ command
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Class Method Details
.description ⇒ Object
49
50
51
|
# File 'lib/byebug/commands/variables.rb', line 49
def description
%{v[ar] cl[ass] \t\t\tshow class variables of self}
end
|
.names ⇒ Object
45
46
47
|
# File 'lib/byebug/commands/variables.rb', line 45
def names
%w(var)
end
|
Instance Method Details
#execute ⇒ Object
36
37
38
39
40
41
42
|
# File 'lib/byebug/commands/variables.rb', line 36
def execute
unless @state.context
errmsg "can't get class variables here.\n"
return
end
var_class_self
end
|
#regexp ⇒ Object
32
33
34
|
# File 'lib/byebug/commands/variables.rb', line 32
def regexp
/^\s* v(?:ar)? \s+ cl(?:ass)? \s*/x
end
|