IO class of PicoRuby

Type aliases

fd_t

Integer | IO

Singleton methods

new

IO.new(*Object args) ?{ (untyped) -> untyped } -> IO

open

IO.open(*Object args) -> IO
IO.open(*Object args) { (IO) -> untyped } -> untyped

pipe

IO.pipe() -> [IO, IO]
IO.pipe{ (IO, IO) -> void } -> untyped

popen

IO.popen(String command, ?String mode, ?in: fd_t, ?out: fd_t, ?err: fd_t) -> IO
IO.popen(String command, ?String mode, ?in: fd_t, ?out: fd_t, ?err: fd_t) { (IO) -> untyped } -> untyped

select

IO.select(Array[fd_t] readfds, ?Array[fd_t] writefds, ?Array[fd_t] exceptfds, ?Integer timeout) -> ([[IO]] | nil)

sysopen

IO.sysopen(String path, ?String mode, ?Integer perm) -> Integer

Instance methods

«

instance.<<(String input) -> self

close

instance.close() -> nil

close_on_exec=

instance.close_on_exec=(bool) -> bool

close_on_exec?

instance.close_on_exec?() -> bool

close_write

instance.close_write() -> nil

closed?

instance.closed?() -> bool

each

instance.each() ?{ (String) -> void } -> self

each_byte

instance.each_byte() ?{ (Integer) -> void } -> self

each_char

instance.each_char() ?{ (String) -> void } -> self

eof?

instance.eof?() -> bool

fileno

instance.fileno() -> Integer

flush

instance.flush() -> self

getbyte

instance.getbyte() -> (Integer | nil)

getc

instance.getc() -> (String | nil)

gets

instance.gets(?String rs, ?Integer limit) -> (String | nil)

isatty

instance.isatty() -> bool

path=

instance.path=(string) -> string

pid

instance.pid() -> (Integer | nil)

pos

instance.pos() -> Integer

pos=

instance.pos=(Integer) -> Integer

pread

instance.pread(Integer length, Integer offset, ?String outbuf) -> String

print

instance.print(*_ToS args) -> nil

printf

instance.printf(*String str) -> nil

puts

instance.puts(*_ToS line) -> nil

pwrite

instance.pwrite(String input, Integer offset) -> Integer

read

instance.read(?(Integer | nil) length, ?String outbuf) -> (String | nil)

readbyte

instance.readbyte() -> Integer

readchar

instance.readchar() -> String

readline

instance.readline(?String sep, ?Integer limit) -> String

readlines

instance.readlines(?String sep, ?Integer limit) -> Array[String]

rewind

instance.rewind() -> Integer

seek

instance.seek(Integer offset, ?Integer whence) -> Integer

sync

instance.sync() -> bool

sync=

instance.sync=(bool) -> bool

sysread

instance.sysread(Integer length, ?String outbuf) -> String

syswrite

instance.syswrite(String input) -> Integer

ungetbyte

instance.ungetbyte(String | Integer byte) -> nil

ungetc

instance.ungetc(String char) -> nil

write

instance.write(String input) -> Integer

Singleton methods

clear_screen

IO.clear_screen() -> nil

get_cursor_position

IO.get_cursor_position-> ([Integer, Integer])

wait_terminal

IO.wait_terminal(?timeout: Integer|Float|nil) -> bool

Instance methods

cooked

instance.cooked() { (IO io) -> untyped } -> untyped

cooked!

instance.cooked!() -> self

echo=

instance.echo=(bool mode) -> bool

echo?

instance.echo?() -> bool

getch

instance.getch() -> String

raw

instance.raw() { (IO io) -> untyped } -> untyped

raw!

instance.raw!() -> self

read_nonblock

instance.read_nonblock(Integer maxlen) -> String
Tags: class