Class: Byebug::ReloadCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/reload.rb

Overview

Implements byebug “reload” command.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_exists?, commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, register_setting_get, register_setting_set, register_setting_var, settings, settings_map, terminal_width

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



45
46
47
# File 'lib/byebug/commands/reload.rb', line 45

def description
  %{r[eload]\tforces source code reloading}
end

.namesObject



41
42
43
# File 'lib/byebug/commands/reload.rb', line 41

def names
  %w(reload)
end

Instance Method Details

#executeObject



32
33
34
35
36
# File 'lib/byebug/commands/reload.rb', line 32

def execute
  Byebug.source_reload
  print "Source code is reloaded. Automatic reloading is "   \
        "#{Command.settings[:autoreload] ? 'on' : 'off'}.\n"
end

#regexpObject



28
29
30
# File 'lib/byebug/commands/reload.rb', line 28

def regexp
  /^\s* r(?:eload)? \s*$/x
end