Class: IRB::InputMethod (Ruby 2.4.2)
Description: Class : IRB::InputMethod - Ruby 2.4.2

Support for the Ruby 2.4 series has ended. See here for reference.

### Home Classes Methods

### In Files

- irb/input-method.rb

### Parent

Object

### Methods

- ::new
- #gets
- #readable_after_eof?

### Class/Module Index

Quicksearch

- IRB::Abort
- IRB::Context
- IRB::ContextExtender
- IRB::ExtendCommandBundle
- IRB::FileInputMethod
- IRB::Frame
- IRB::InputMethod
- IRB::Inspector
- IRB::Irb
- IRB::IrbLoader
- IRB::JobManager
- IRB::LoadAbort
- IRB::MethodExtender
- IRB::Notifier
- IRB::Notifier::AbstractNotifier
- IRB::Notifier::CompositeNotifier
- IRB::Notifier::LeveledNotifier
- IRB::Notifier::NoMsgNotifier
- IRB::OutputMethod
- IRB::ReadlineInputMethod
- IRB::StdioInputMethod
- IRB::StdioOutputMethod
- IRB::WorkSpace
- Object
- XMP
- XMP::StringInputMethod

No matching classes.

# IRB::InputMethod

### Attributes

file_name[R]

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

prompt[RW]

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
    end

### 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
      IRB.fail NotImplementedError, "gets"
    end

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?
      false
    end