Class: Byebug::VarInstanceCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::VarInstanceCommand
show all
- Defined in:
- lib/byebug/commands/variables.rb
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
121
122
123
|
# File 'lib/byebug/commands/variables.rb', line 121
def description
%{v[ar] i[nstance] <object>\tshow instance variables of object}
end
|
.names ⇒ Object
117
118
119
|
# File 'lib/byebug/commands/variables.rb', line 117
def names
%w(var)
end
|
Instance Method Details
#execute ⇒ Object
111
112
113
114
|
# File 'lib/byebug/commands/variables.rb', line 111
def execute
obj = bb_eval(@match.post_match.empty? ? 'self' : @match.post_match)
var_list(obj.instance_variables, obj.instance_eval{binding()})
end
|
#regexp ⇒ Object
107
108
109
|
# File 'lib/byebug/commands/variables.rb', line 107
def regexp
/^\s* v(?:ar)? \s+ ins(?:tance)? \s*/x
end
|