Module: IOConsoleCompatible

Included in:
File, StringIO, Tempfile
Defined in:
lib/highline/io_console_compatible.rb

Overview

On tests, we try to simulate input output with StringIO, Tempfile and File objects.

For this to be accomplished, we have to do some tweaking so that they respond adequately to the called methods during tests.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#echoObject

Returns the value of attribute echo.



20
21
22
# File 'lib/highline/io_console_compatible.rb', line 20

def echo
  @echo
end

Instance Method Details

#getchObject



16
17
18
# File 'lib/highline/io_console_compatible.rb', line 16

def getch
  getc
end

#winsizeObject



22
23
24
# File 'lib/highline/io_console_compatible.rb', line 22

def winsize
  [24, 80]
end