Class: GZippedTar::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/gzipped_tar/reader.rb

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Reader

Returns a new instance of Reader.



8
9
10
# File 'lib/gzipped_tar/reader.rb', line 8

def initialize(raw)
  @raw = raw
end

Instance Method Details

#read(path) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/gzipped_tar/reader.rb', line 12

def read(path)
  result = nil
  reader.each { |entry| result = entry.read if entry.full_name == path }
  result
ensure
  reader.rewind
end