Class: Byebug::VarInstanceCommand
- Inherits:
-
Command
- Object
- Command
- Byebug::VarInstanceCommand
show all
- Defined in:
- lib/byebug/commands/variables.rb
Overview
Show instance variables and its values.
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
176
177
178
179
180
|
# File 'lib/byebug/commands/variables.rb', line 176
def description
%(v[ar] i[nstance] <object>
Show instance variables of <object>.)
end
|
.names ⇒ Object
172
173
174
|
# File 'lib/byebug/commands/variables.rb', line 172
def names
%w(var)
end
|
Instance Method Details
#execute ⇒ Object
167
168
169
|
# File 'lib/byebug/commands/variables.rb', line 167
def execute
var_instance(@match.post_match.empty? ? 'self' : @match.post_match)
end
|
#regexp ⇒ Object
163
164
165
|
# File 'lib/byebug/commands/variables.rb', line 163
def regexp
/^\s* v(?:ar)? \s+ ins(?:tance)? \s*/x
end
|