Class: StringIO
- Inherits:
-
Object
- Object
- StringIO
- Defined in:
- lib/io/stream/shim/buffered.rb,
lib/io/stream/shim/readable.rb
Overview
StringIO extensions for buffering support.
Instance Method Summary collapse
-
#buffered=(value) ⇒ Object
Set the buffered state of the StringIO.
-
#buffered? ⇒ Boolean
Check if the StringIO is buffered.
-
#readable? ⇒ Boolean
Check if the StringIO is readable.
Instance Method Details
#buffered=(value) ⇒ Object
Set the buffered state of the StringIO.
77 78 79 |
# File 'lib/io/stream/shim/buffered.rb', line 77 def buffered=(value) self.sync = !value end |
#buffered? ⇒ Boolean
Check if the StringIO is buffered.
71 72 73 |
# File 'lib/io/stream/shim/buffered.rb', line 71 def buffered? return !self.sync end |
#readable? ⇒ Boolean
Check if the StringIO is readable.
45 46 47 |
# File 'lib/io/stream/shim/readable.rb', line 45 def readable? !eof? end |