Class: Byebug::PryCommand
Overview
Enter Pry from byebug’s prompt
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match
Methods included from StringFunctions
Methods included from FileFunctions
#get_line, #get_lines, #n_lines, #normalize
Methods included from ParseFunctions
#get_int, #parse_steps, #syntax_valid?, #without_stderr
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
31 32 33 34 35 |
# File 'lib/byebug/commands/pry.rb', line 31 def description prettify <<-EOD pry Starts a Pry session. EOD end |
.names ⇒ Object
27 28 29 |
# File 'lib/byebug/commands/pry.rb', line 27 def names %w(pry) end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/byebug/commands/pry.rb', line 12 def execute unless @state.interface.is_a?(LocalInterface) return errmsg(pr('base.errors.only_local')) end begin require 'pry' rescue LoadError errmsg(pr('pry.errors.not_installed')) end get_binding.pry end |
#regexp ⇒ Object
8 9 10 |
# File 'lib/byebug/commands/pry.rb', line 8 def regexp /^\s* pry \s*$/x end |