Class: Byebug::VarInstanceCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::VarInstanceCommand
show all
- Defined in:
- lib/byebug/commands/variables.rb
Constant Summary
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.description ⇒ Object
120
121
122
|
# File 'lib/byebug/commands/variables.rb', line 120
def description
%{v[ar] i[nstance] <object>\tshow instance variables of object}
end
|
.names ⇒ Object
116
117
118
|
# File 'lib/byebug/commands/variables.rb', line 116
def names
%w(var)
end
|
Instance Method Details
#execute ⇒ Object
110
111
112
113
|
# File 'lib/byebug/commands/variables.rb', line 110
def execute
obj = debug_eval(@match.post_match.empty? ? 'self' : @match.post_match)
var_list(obj.instance_variables, obj.instance_eval{binding()})
end
|
#regexp ⇒ Object
106
107
108
|
# File 'lib/byebug/commands/variables.rb', line 106
def regexp
/^\s*v(?:ar)?\s+ins(?:tance)?\s*/
end
|