Class: Dir
- Inherits:
-
Object
- Object
- Dir
- Defined in:
- lib/jkr/dirlock.rb
Class Method Summary collapse
Class Method Details
.lock(dir_path) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/jkr/dirlock.rb', line 3 def self.lock(dir_path) File.open(dir_path, "r") do |f| f.flock(File::LOCK_EX) yield end end |