Sha256: 81f033db48aa411b0e0feb7d90e961f57f47708cca52b8d30fd9385b4963546b
Contents?: true
Size: 261 Bytes
Versions: 4
Compression:
Stored size: 261 Bytes
Contents
class Lock; end class << Lock def use lock_file @lock_file = lock_file end def locked? File.exist? @lock_file end def lock system "touch #{@lock_file}" end def unlock lock system "rm #{@lock_file}" end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
atesta-0.0.4 | lib/lock.rb |
atesta-0.0.3 | lib/lock.rb |
atesta-0.0.2 | lib/lock.rb |
atesta-0.0.1 | lib/lock.rb |