Class: Debugger::LoadCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/load.rb

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options

Constructor Details

This class inherits a constructor from Debugger::Command

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Debugger::Command

Instance Method Details

#executeObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/ruby-debug/commands/load.rb', line 7

def execute
  fileName = @match.post_match
  @printer.print_debug("loading file: %s", fileName)
  begin
    load fileName
    @printer.print_load_result(fileName)
  rescue Exception => error
    @printer.print_load_result(fileName, error)
  end
end

#regexpObject



3
4
5
# File 'lib/ruby-debug/commands/load.rb', line 3

def regexp
  /^\s*load\s+/
end