Class: Debugger::IncludeFile
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::IncludeFile
show all
- Defined in:
- lib/ruby-debug-ide/commands/file_filtering.rb
Overview
Constant Summary
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
.help(cmd) ⇒ Object
28
29
30
31
32
|
# File 'lib/ruby-debug-ide/commands/file_filtering.rb', line 28
def help(cmd)
%{
include file - adds file/dir to file filter (either remove already excluded or add as included)
}
end
|
.help_command ⇒ Object
24
25
26
|
# File 'lib/ruby-debug-ide/commands/file_filtering.rb', line 24
def help_command
'include'
end
|
Instance Method Details
#execute ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/ruby-debug-ide/commands/file_filtering.rb', line 9
def execute
file = @match[1]
return if file.nil?
file = realpath(file)
if Command.file_filter_supported?
Debugger.file_filter.include(file)
print_file_included(file)
else
print_debug("file filter is not supported")
end
end
|
#regexp ⇒ Object
5
6
7
|
# File 'lib/ruby-debug-ide/commands/file_filtering.rb', line 5
def regexp
/ ^\s*include\s+(.+?)\s*$/x
end
|