Method: Bundler::CompactIndexClient::CacheFile.write

Defined in:
lib/bundler/compact_index_client/cache_file.rb

.write(path, data, digests = nil) ⇒ Object

Write data to a temp file, then replace the original file with it verifying the digests if given.



39
40
41
42
43
44
45
# File 'lib/bundler/compact_index_client/cache_file.rb', line 39

def self.write(path, data, digests = nil)
  return unless data
  new(path) do |file|
    file.digests = digests
    file.write(data)
  end
end