Sha256: 75bdb570c06ff3f20bcce7e4fcea6378c16daf56080e8efecc3593f4b3fa12b2

Contents?: true

Size: 503 Bytes

Versions: 6

Compression:

Stored size: 503 Bytes

Contents

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('Command is available only in local mode.')
      end

      IRB.start(__FILE__)
    end

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

      def description
        %{irb        Starts an Interactive Ruby (IRB) session.}
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
byebug-3.5.1 lib/byebug/commands/irb.rb
byebug-3.5.0 lib/byebug/commands/irb.rb
byebug-3.4.2 lib/byebug/commands/irb.rb
byebug-3.4.1 lib/byebug/commands/irb.rb
byebug-3.4.0 lib/byebug/commands/irb.rb
byebug-3.3.0 lib/byebug/commands/irb.rb