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

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



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

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

.namesObject



30
31
32
# File 'lib/byebug/commands/reload.rb', line 30

def names
  %w(reload)
end

Instance Method Details

#executeObject



23
24
25
26
27
# File 'lib/byebug/commands/reload.rb', line 23

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

#regexpObject



19
20
21
# File 'lib/byebug/commands/reload.rb', line 19

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