Sha256: 22a06db8b4d35138cdfb9b2670c432c2c9cdf658bf1d057c2fd08ce93114cd66

Contents?: true

Size: 543 Bytes

Versions: 8

Compression:

Stored size: 543 Bytes

Contents

require 'byebug/command'
require 'irb'

module Byebug
  #
  # Enter IRB from byebug's prompt
  #
  class IrbCommand < Command
    def regexp
      /^\s* irb \s*$/x
    end

    def execute
      unless @state.interface.is_a?(LocalInterface)
        return errmsg(pr('base.errors.only_local'))
      end

      IRB.start(__FILE__)
    end

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

      def description
        prettify <<-EOD
          irb  Starts an Interactive Ruby (IRB) 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/irb.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/byebug-4.0.5/lib/byebug/commands/irb.rb
byebug-4.0.5 lib/byebug/commands/irb.rb
byebug-4.0.4 lib/byebug/commands/irb.rb
byebug-4.0.3 lib/byebug/commands/irb.rb
byebug-4.0.2 lib/byebug/commands/irb.rb
byebug-4.0.1 lib/byebug/commands/irb.rb
byebug-4.0.0 lib/byebug/commands/irb.rb