Class: Archive::Tar::Minitar::Writer::RestrictedStream

Inherits:
Object
  • Object
show all
Defined in:
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

BoundedStream

Instance Method Summary collapse

Constructor Details

#initialize(anIO) ⇒ RestrictedStream

Returns a new instance of RestrictedStream.



251
252
253
# File 'lib/archive/tar/minitar.rb', line 251

def initialize(anIO)
  @io = anIO
end

Instance Method Details

#write(data) ⇒ Object



255
256
257
# File 'lib/archive/tar/minitar.rb', line 255

def write(data)
  @io.write(data)
end