Class: IO

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

Direct Known Subclasses

File

Defined Under Namespace

Modules: Readable, Writable

Constant Summary

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

#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:



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

def closed?
  @closed
end

#tty?Boolean

Returns:



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

def tty?
  @tty
end

#write(string) ⇒ Object



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

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