Class: Archive::Tar::Minitar::Writer::RestrictedStream
- Inherits:
-
Object
- Object
- Archive::Tar::Minitar::Writer::RestrictedStream
- Defined in:
- lib/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb
Overview
A stream wrapper that can only be written to. Any attempt to read from this restricted stream will result in a NameError being thrown.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(anIO) ⇒ RestrictedStream
constructor
A new instance of RestrictedStream.
- #write(data) ⇒ Object
Constructor Details
#initialize(anIO) ⇒ RestrictedStream
Returns a new instance of RestrictedStream.
251 252 253 |
# File 'lib/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb', line 251 def initialize(anIO) @io = anIO end |
Instance Method Details
#write(data) ⇒ Object
255 256 257 |
# File 'lib/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb', line 255 def write(data) @io.write(data) end |