Sha256: 35e6f2588aa6e5117fb1acd929ad847894b532ef018a437b8f0c6ba1da533247
Contents?: true
Size: 411 Bytes
Versions: 14
Compression:
Stored size: 411 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::Guard::File attr_reader :name def initialize(name) @name = name end def lock FileUtils.touch path end def locked? File.exists? path end def path @path ||= File.join( ThinkingSphinx::Configuration.instance.indices_location, "ts-#{name}.tmp" ) end def unlock FileUtils.rm(path) if locked? end end
Version data entries
14 entries across 14 versions & 1 rubygems