Use a File for IO with irb, see InputMethod
Methods
Attributes
| [R] | file_name | The file name of this input method, usually given during initialization. |
Class Public methods
new(file)
Link
Creates a new input method object
Source: show
# File lib/irb/input-method.rb, line 99 def initialize(file) super @io = IRB::MagicFile.open(file) end
Instance Public methods
encoding()
Link
The external encoding for standard input.
Source: show
# File lib/irb/input-method.rb, line 125 def encoding @io.external_encoding end