Class: GZippedTar::Reader
- Inherits:
-
Object
- Object
- GZippedTar::Reader
- Defined in:
- lib/gzipped_tar/reader.rb
Instance Method Summary collapse
-
#initialize(raw) ⇒ Reader
constructor
A new instance of Reader.
- #read(path) ⇒ Object
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 |