Sha256: 3481d575857c9fc32ac83b03b4454ff006c1b415f266ab199acd4a4653bb97ac
Contents?: true
Size: 353 Bytes
Versions: 11
Compression:
Stored size: 353 Bytes
Contents
module Fontist module Utils module Locking def lock(lock_path) File.dirname(lock_path).tap do |dir| FileUtils.mkdir_p(dir) unless File.exist?(dir) end f = File.open(lock_path, File::CREAT) f.flock(File::LOCK_EX) yield ensure f.flock(File::LOCK_UN) end end end end
Version data entries
11 entries across 11 versions & 1 rubygems