Class: Giff::GemFile
- Inherits:
-
Object
- Object
- Giff::GemFile
- Defined in:
- lib/giff/gem_file.rb
Overview
“gem file” not a “gemfile”
Instance Attribute Summary collapse
-
#checksums ⇒ Object
readonly
Returns the value of attribute checksums.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(io) ⇒ GemFile
constructor
A new instance of GemFile.
Constructor Details
#initialize(io) ⇒ GemFile
Returns a new instance of GemFile.
9 10 11 12 13 14 15 16 17 |
# File 'lib/giff/gem_file.rb', line 9 def initialize(io) io = File.open(io) if io.is_a?(String) tarball = Tarball.new(io) @checksums = Giff.gunzip(tarball.read("checksums.yaml.gz")) = Giff.gunzip(tarball.read("metadata.gz")) @data = Tarball.new(StringIO.new(tarball.read("data.tar.gz")), gz: true) #@tarball = tarball end |
Instance Attribute Details
#checksums ⇒ Object (readonly)
Returns the value of attribute checksums.
7 8 9 |
# File 'lib/giff/gem_file.rb', line 7 def checksums @checksums end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/giff/gem_file.rb', line 7 def data @data end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/giff/gem_file.rb', line 7 def end |