Class: Hx::Interop::StreamAdapter
- Inherits:
-
Object
- Object
- Hx::Interop::StreamAdapter
- Defined in:
- lib/interop/stream_adapter.rb
Overview
Base class for StreamReader and StreamWriter
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(stream) ⇒ StreamAdapter
constructor
A new instance of StreamAdapter.
Constructor Details
#initialize(stream) ⇒ StreamAdapter
Returns a new instance of StreamAdapter.
6 7 8 9 10 11 12 13 14 |
# File 'lib/interop/stream_adapter.rb', line 6 def initialize(stream) if stream.is_a? IO stream.sync = true stream.binmode end @stream = stream @mutex = Mutex.new end |