Class Debugger::SourceCommand
In: cli/ruby-debug/commands/source.rb
Parent: Command

Implements debugger "source" command.

Methods

execute   help   help_command   regexp  

Public Class methods

[Source]

    # File cli/ruby-debug/commands/source.rb, line 28
28:       def help(cmd)
29:         %{
30:           source FILE\texecutes a file containing debugger commands
31:         }
32:       end

[Source]

    # File cli/ruby-debug/commands/source.rb, line 24
24:       def help_command
25:         'source'
26:       end

Public Instance methods

[Source]

    # File cli/ruby-debug/commands/source.rb, line 10
10:     def execute
11:       file = File.expand_path(@match[1]).strip
12:       unless File.exist?(file)
13:         errmsg "Command file '#{file}' is not found\n"
14:         return
15:       end
16:       if @state and @state.interface
17:         @state.interface.command_queue += File.open(file).readlines
18:       else
19:         Debugger.run_script(file, @state)
20:       end
21:     end

[Source]

   # File cli/ruby-debug/commands/source.rb, line 6
6:     def regexp
7:       /^\s* so(?:urce)? \s+ (.+) $/x
8:     end

[Validate]