Class: Giff::GemFile

Inherits:
Object
  • Object
show all
Defined in:
lib/giff/gem_file.rb

Overview

“gem file” not a “gemfile”

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#checksumsObject (readonly)

Returns the value of attribute checksums.



7
8
9
# File 'lib/giff/gem_file.rb', line 7

def checksums
  @checksums
end

#dataObject (readonly)

Returns the value of attribute data.



7
8
9
# File 'lib/giff/gem_file.rb', line 7

def data
  @data
end

#metadataObject (readonly)

Returns the value of attribute metadata.



7
8
9
# File 'lib/giff/gem_file.rb', line 7

def 
  
end