Class: IO
- Inherits:
-
Object
- Object
- IO
- Defined in:
- lib/io/stream/shim/readable.rb,
lib/io/stream.rb,
lib/io/stream/shim/timeout.rb,
lib/io/stream/shim/buffered.rb
Overview
Released under the MIT License. Copyright, 2023-2024, by Samuel Williams.
Defined Under Namespace
Modules: Stream Classes: TimeoutError
Instance Attribute Summary collapse
-
#timeout ⇒ Object
Compatibility shim.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#timeout ⇒ Object
Compatibility shim.
12 13 14 |
# File 'lib/io/stream/shim/timeout.rb', line 12 def timeout @timeout end |
Class Method Details
Instance Method Details
#buffered=(value) ⇒ Object
12 13 14 |
# File 'lib/io/stream/shim/buffered.rb', line 12 def buffered=(value) self.sync = !value end |
#buffered? ⇒ Boolean
8 9 10 |
# File 'lib/io/stream/shim/buffered.rb', line 8 def buffered? return !self.sync end |
#readable? ⇒ Boolean
8 9 10 11 |
# File 'lib/io/stream/shim/readable.rb', line 8 def readable? # Do not call `eof?` here as it is not concurrency-safe and it can block. !closed? end |