Sha256: ca6647fa605ea44f48feee4fdffde11a56785da8452765a816a3db91cc1d2ae8
Contents?: true
Size: 625 Bytes
Versions: 34
Compression:
Stored size: 625 Bytes
Contents
module Inch module Codebase class Serializer INCH_DB_DIR = File.join('.inch', 'db') def self.filename(revision) File.join(INCH_DB_DIR, revision) end def self.save(codebase, filename) content = Marshal.dump(codebase) FileUtils.mkdir_p(File.dirname(filename)) File.open(filename, 'wb') { |file| file.write(content) } end def self.load(filename) codebase = Marshal.load(File.binread(filename)) codebase.objects.each do |object| object.object_lookup = codebase.objects end codebase end end end end
Version data entries
34 entries across 34 versions & 1 rubygems