Sha256: ad0140a9979956a7ce325ec004d459496e9967b0545efe694403d6e55032e565

Contents?: true

Size: 563 Bytes

Versions: 10

Compression:

Stored size: 563 Bytes

Contents

require 'byebug/command'
require 'irb'

module Byebug
  #
  # Enter IRB from byebug's prompt
  #
  class IrbCommand < Command
    self.allow_in_post_mortem = true

    def self.regexp
      /^\s* irb \s*$/x
    end

    def self.description
      <<-EOD
        irb

        #{short_description}
      EOD
    end

    def self.short_description
      'Starts an IRB session'
    end

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

      IRB.start(__FILE__)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
byebug-8.2.2 lib/byebug/commands/irb.rb
byebug-8.2.1 lib/byebug/commands/irb.rb
byebug-8.2.0 lib/byebug/commands/irb.rb
byebug-8.1.0 lib/byebug/commands/irb.rb
byebug-8.0.1 lib/byebug/commands/irb.rb
byebug-8.0.0 lib/byebug/commands/irb.rb
byebug-7.0.0 lib/byebug/commands/irb.rb
byebug-6.0.2 lib/byebug/commands/irb.rb
byebug-6.0.1 lib/byebug/commands/irb.rb
byebug-6.0.0 lib/byebug/commands/irb.rb