Class: Dapp::Dimg::Lock::File

Inherits:
Base
  • Object
show all
Defined in:
lib/dapp/dimg/lock/file.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#lock, #synchronize, #unlock

Constructor Details

#initialize(locks_path, name) ⇒ File

Returns a new instance of File.



15
16
17
18
19
# File 'lib/dapp/dimg/lock/file.rb', line 15

def initialize(locks_path, name)
  super(name)

  @locks_path = Pathname.new(locks_path).tap(&:mkpath)
end

Class Attribute Details

.counterObject



8
9
10
# File 'lib/dapp/dimg/lock/file.rb', line 8

def counter
  @counter ||= 0
end

Instance Attribute Details

#locks_pathObject (readonly)

<< self



13
14
15
# File 'lib/dapp/dimg/lock/file.rb', line 13

def locks_path
  @locks_path
end