Class: Debugger::InspectCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::InspectCommand
show all
- Defined in:
- lib/ruby-debug-ide/commands/inspect.rb
Constant Summary
collapse
- @@references =
reference inspection results in order to save them from the GC
[]
Constants inherited
from Command
Command::DEF_OPTIONS
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Command
commands, file_filter_supported?, #find, inherited, #initialize, load_commands, #match, method_missing, options, unescape_incoming
Class Method Details
.clear_references ⇒ Object
9
10
11
|
# File 'lib/ruby-debug-ide/commands/inspect.rb', line 9
def self.clear_references
@@references = []
end
|
.reference_result(result) ⇒ Object
6
7
8
|
# File 'lib/ruby-debug-ide/commands/inspect.rb', line 6
def self.reference_result(result)
@@references << result
end
|
Instance Method Details
#execute ⇒ Object
17
18
19
20
21
22
|
# File 'lib/ruby-debug-ide/commands/inspect.rb', line 17
def execute
binding = @state.context ? get_binding : TOPLEVEL_BINDING
obj = debug_eval(@match.post_match, binding)
InspectCommand.reference_result(obj)
@printer.print_inspect(obj)
end
|
#regexp ⇒ Object
13
14
15
|
# File 'lib/ruby-debug-ide/commands/inspect.rb', line 13
def regexp
/^\s*v(?:ar)?\s+inspect\s+/
end
|