Sha256: 5d7787b036c2d274f4819bd136b59e7f3ee0e3977b53e09dc8d0659e012f7a27

Contents?: true

Size: 641 Bytes

Versions: 16

Compression:

Stored size: 641 Bytes

Contents

require 'byebug/history'

module Byebug
  #
  # Interface class for remote use of byebug.
  #
  class RemoteInterface < Interface
    def initialize(socket)
      super()
      @input = socket
      @output = socket
      @error = socket
    end

    def read_command(prompt)
      super("PROMPT #{prompt}")
    end

    def confirm(prompt)
      super("CONFIRM #{prompt}")
    end

    def close
      output.close
    rescue IOError
      errmsg('Error closing the interface...')
    end

    def readline(prompt)
      output.puts(prompt)

      result = input.gets
      raise IOError unless result

      result.chomp
    end
  end
end

Version data entries

16 entries across 15 versions & 3 rubygems

Version Path
dirwatch-0.0.2 vendor/bundle/ruby/2.3.0/gems/byebug-9.1.0/lib/byebug/interfaces/remote_interface.rb
tdiary-5.0.6 vendor/bundle/gems/byebug-9.1.0/lib/byebug/interfaces/remote_interface.rb
byebug-9.1.0 lib/byebug/interfaces/remote_interface.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/interfaces/remote_interface.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/interfaces/remote_interface.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/interfaces/remote_interface.rb
byebug-9.0.6 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.5 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.4 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.3 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.2 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.1 lib/byebug/interfaces/remote_interface.rb
byebug-9.0.0 lib/byebug/interfaces/remote_interface.rb
byebug-8.2.5 lib/byebug/interfaces/remote_interface.rb
byebug-8.2.4 lib/byebug/interfaces/remote_interface.rb
byebug-8.2.3 lib/byebug/interfaces/remote_interface.rb