class CarthageCacheRes::CarthageCacheResLock
Constants
- LOCK_FILE_NAME
Attributes
lock_file_path[R]
Public Class Methods
new(build_directory)
click to toggle source
# File lib/carthage_cache_res/carthage_cache_lock.rb, line 10 def initialize(build_directory) @lock_file_path = File.join(build_directory, LOCK_FILE_NAME) end
Public Instance Methods
lock_digest()
click to toggle source
# File lib/carthage_cache_res/carthage_cache_lock.rb, line 14 def lock_digest File.read(lock_file_path).strip if File.exist?(lock_file_path) end
valid_digest?(digest)
click to toggle source
# File lib/carthage_cache_res/carthage_cache_lock.rb, line 22 def valid_digest?(digest) lock_digest == digest end
write_lock_digest(digest)
click to toggle source
# File lib/carthage_cache_res/carthage_cache_lock.rb, line 18 def write_lock_digest(digest) File.open(lock_file_path, "w") { |f| f.write(digest) } end