Class: IOAdapter
- Inherits:
-
IO
- Object
- IO
- IOAdapter
- Defined in:
- lib/IOAdapter.rb
Instance Attribute Summary collapse
-
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
Instance Method Summary collapse
-
#initialize(io) ⇒ IOAdapter
constructor
A new instance of IOAdapter.
- #write(string) ⇒ Object
Constructor Details
#initialize(io) ⇒ IOAdapter
Returns a new instance of IOAdapter.
5 6 7 8 |
# File 'lib/IOAdapter.rb', line 5 def initialize(io) __setobj__(io) @output_buffer = [] end |
Instance Attribute Details
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
4 5 6 |
# File 'lib/IOAdapter.rb', line 4 def output_buffer @output_buffer end |
Instance Method Details
#write(string) ⇒ Object
10 11 12 13 |
# File 'lib/IOAdapter.rb', line 10 def write(string) @output_buffer << string self.__getobj__.write(string) end |