Class: Byebug::ReloadCommand

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

Overview

Implements byebug “reload” command.

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, #find, inherited, #initialize, load_commands, #match, method_missing, options, #print_subcmds, register_setting_get, register_setting_set, register_setting_var, settings, settings_map

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.help(cmd) ⇒ Object



36
37
38
39
40
# File 'lib/byebug/commands/reload.rb', line 36

def help(cmd)
  %{
    r[eload]\tforces source code reloading
  }
end

.help_commandObject



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

def help_command
  'reload'
end

Instance Method Details

#executeObject



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

def execute
  Byebug.source_reload
  print "Source code is reloaded. Automatic reloading is #{source_reloading}.\n"
end

#regexpObject



16
17
18
# File 'lib/byebug/commands/reload.rb', line 16

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