class IRB::InputMethod

Attributes

The file name of this input method, usually given during initialization.

The irb prompt associated with this input method

Public Class Methods

Creates a new input method object

# File lib/irb/input-method.rb, line 23
def initialize(file = STDIN_FILE_NAME)
  @file_name = file
end

Public Instance Methods

Reads the next line from this input method.

See IO#gets for more information.

# File lib/irb/input-method.rb, line 35
def gets
  fail NotImplementedError, "gets"
end

For debug message

# File lib/irb/input-method.rb, line 57
def inspect
  'Abstract InputMethod'
end

Whether this input method is still readable when there is no more data to read.

See IO#eof for more information.

# File lib/irb/input-method.rb, line 52
def readable_after_eof?
  false
end
# File lib/irb/input-method.rb, line 40
def winsize
  if instance_variable_defined?(:@stdout) && @stdout.tty?
    @stdout.winsize
  else
    [24, 80]
  end
end