class Byebug::PryCommand - byebug-4.0.5 Documentation

# class Byebug::PryCommand

Enter Pry from byebug's prompt

### Public Class Methods

description() click to toggle source

    # File lib/byebug/commands/pry.rb, line 31
    def description
      prettify <<-EOD
        pry  Starts a Pry session.
      EOD
    end

names() click to toggle source

    # File lib/byebug/commands/pry.rb, line 27
    def names
      %w(pry)
    end

### Public Instance Methods

execute() click to toggle source

    # 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() click to toggle source

    # File lib/byebug/commands/pry.rb, line 8
    def regexp
      /^\s* pry \s*$/x
    end