Maintenance of Ruby 2.0.0 ended on February 24, 2016. Read more

In Files

  • irb/input-method.rb




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


The irb prompt associated with this input method

Public Class Methods

new(file = STDIN_FILE_NAME) click to toggle source

Creates a new input method object

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

Public Instance Methods

gets() click to toggle source

Reads the next line from this input method.

See IO#gets for more information.

               # File irb/input-method.rb, line 32
def gets NotImplementedError, "gets"
readable_after_eof?() click to toggle source

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

See IO#eof for more information.

               # File irb/input-method.rb, line 41
def readable_after_eof?

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit