Class: LZWS::Stream::Raw::Abstract
- Inherits:
-
Object
- Object
- LZWS::Stream::Raw::Abstract
- Defined in:
- lib/lzws/stream/raw/abstract.rb
Direct Known Subclasses
Instance Method Summary collapse
- #close(&writer) ⇒ Object
- #closed? ⇒ Boolean
-
#flush(&writer) ⇒ Object
-- write --.
-
#initialize(native_stream) ⇒ Abstract
constructor
A new instance of Abstract.
Constructor Details
#initialize(native_stream) ⇒ Abstract
Returns a new instance of Abstract.
13 14 15 16 |
# File 'lib/lzws/stream/raw/abstract.rb', line 13 def initialize(native_stream) @native_stream = native_stream @is_closed = false end |
Instance Method Details
#close(&writer) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/lzws/stream/raw/abstract.rb', line 48 def close(&writer) write_result(&writer) @native_stream.close @is_closed = true end |
#closed? ⇒ Boolean
55 56 57 |
# File 'lib/lzws/stream/raw/abstract.rb', line 55 def closed? @is_closed end |
#flush(&writer) ⇒ Object
-- write --
20 21 22 23 24 25 26 27 28 |
# File 'lib/lzws/stream/raw/abstract.rb', line 20 def flush(&writer) do_not_use_after_close Validation.validate_proc writer write_result(&writer) nil end |