Method: GemMirror::VersionsFile.load

Defined in:
lib/gem_mirror/versions_file.rb

.load(content) ⇒ GemMirror::VersionsFile

Reads the versions file from the specified String.

Parameters:

  • content (String)

Returns:



22
23
24
25
26
27
28
29
30
# File 'lib/gem_mirror/versions_file.rb', line 22

def self.load(content)
  buffer   = StringIO.new(content)
  reader   = Zlib::GzipReader.new(buffer)
  instance = new(Marshal.load(reader.read))

  reader.close

  instance
end