Class: IO

Inherits:
Object show all
Defined in:
opal/opal/corelib/io.rb

Direct Known Subclasses

File

Defined Under Namespace

Modules: Readable, Writable

Constant Summary collapse

SEEK_SET =
0
SEEK_CUR =
1
SEEK_END =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#syncObject

Returns the value of attribute sync.


21
22
23
# File 'opal/opal/corelib/io.rb', line 21

def sync
  @sync
end

#ttyObject

Returns the value of attribute tty.


21
22
23
# File 'opal/opal/corelib/io.rb', line 21

def tty
  @tty
end

#write_procObject

Returns the value of attribute write_proc.


14
15
16
# File 'opal/opal/corelib/io.rb', line 14

def write_proc
  @write_proc
end

Instance Method Details

#closed?Boolean

Returns:

[View source]

10
11
12
# File 'opal/opal/corelib/io.rb', line 10

def closed?
  @closed
end

#flushObject

[View source]

23
24
25
# File 'opal/opal/corelib/io.rb', line 23

def flush
  # noop
end

#tty?Boolean

Returns:

[View source]

6
7
8
# File 'opal/opal/corelib/io.rb', line 6

def tty?
  @tty
end

#write(string) ⇒ Object

[View source]

16
17
18
19
# File 'opal/opal/corelib/io.rb', line 16

def write(string)
  `self.write_proc(string)`
  string.size
end