Class: TestInterface

### Home Classes Methods

### In Files

- lib/debugger/test/test_interface.rb

### Parent

Debugger::Interface

### Methods

- ::new
- #close
- #confirm
- #empty?
- #errmsg
- #finalize
- #inspect
- #print
- #read_command
- #readline_support?

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# TestInterface

### Attributes

command_queue[RW]
confirm_queue[R]
error_queue[R]
histfile[RW]
history_length[RW]
history_save[RW]
input_queue[R]
output_queue[R]
print_queue[RW]
readline_support[RW]
restart_file[RW]
test_block[RW]

### Public Class Methods

new() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 5
    def initialize
      @input_queue = []
      @output_queue = []
      @error_queue = []
      @confirm_queue = []
      @command_queue = []
      @print_queue = []
      @readline_support = false
    end

### Public Instance Methods

close() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 44
    def close
    end

confirm(message) click to toggle source

    # File lib/debugger/test/test_interface.rb, line 32
    def confirm(message)
      @confirm_queue << message
      read_command message
    end

empty?() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 47
    def empty?
      [input_queue, output_queue, error_queue, confirm_queue, print_queue].all?(&:empty?)
    end

errmsg(value) click to toggle source

    # File lib/debugger/test/test_interface.rb, line 15
    def errmsg(value)
      @error_queue << value
    end

finalize() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 41
    def finalize
    end

inspect() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 51
    def inspect
      [
        "input_queue: #{input_queue.inspect}",
        "output_queue: #{output_queue.inspect}",
        "error_queue: #{error_queue.inspect}",
        "confirm_queue: #{confirm_queue.inspect}",
        "print_queue: #{print_queue.inspect}"
      ].join("\n")
    end

print(value) click to toggle source

    # File lib/debugger/test/test_interface.rb, line 28
    def print(value)
      @output_queue << value
    end

read_command(*args) click to toggle source

    # File lib/debugger/test/test_interface.rb, line 19
    def read_command(*args)
      if @input_queue.empty? && test_block
        test_block.call
        self.test_block = nil
      end
      result = @input_queue.shift
      result.is_a?(Proc) ? result.call : result
    end

readline_support?() click to toggle source

    # File lib/debugger/test/test_interface.rb, line 37
    def readline_support?
      @readline_support
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.