Sha256: 260deb9bb1cfbbe16f974edec6b2f7740d79828f7584e1e1163d7b4f43f94b7f

Contents?: true

Size: 620 Bytes

Versions: 8

Compression:

Stored size: 620 Bytes

Contents

require 'byebug/command'

module Byebug
  #
  # Enter Pry from byebug's prompt
  #
  class PryCommand < Command
    def regexp
      /^\s* pry \s*$/x
    end

    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

    class << self
      def names
        %w(pry)
      end

      def description
        prettify <<-EOD
          pry  Starts a Pry session.
        EOD
      end
    end
  end
end

Version data entries

8 entries across 7 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/byebug-4.0.5/lib/byebug/commands/pry.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/byebug-4.0.5/lib/byebug/commands/pry.rb
byebug-4.0.5 lib/byebug/commands/pry.rb
byebug-4.0.4 lib/byebug/commands/pry.rb
byebug-4.0.3 lib/byebug/commands/pry.rb
byebug-4.0.2 lib/byebug/commands/pry.rb
byebug-4.0.1 lib/byebug/commands/pry.rb
byebug-4.0.0 lib/byebug/commands/pry.rb