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

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

- (RestrictedStream) initialize(anIO)

Returns a new instance of RestrictedStream



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

def initialize(anIO)
  @io = anIO
end

Instance Method Details

- (Object) write(data)



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

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