Class: Dapp::Lock::File

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

Overview

File

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(lock_path, name) ⇒ File

Returns a new instance of File.



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

def initialize(lock_path, name)
  super(name)

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

Class Attribute Details

.counterObject



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

def counter
  @counter ||= 0
end

Instance Attribute Details

#lock_pathObject (readonly)

<< self



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

def lock_path
  @lock_path
end