Class: AdmitOne::LockFile
- Inherits:
-
Object
- Object
- AdmitOne::LockFile
- Defined in:
- lib/admit_one/lock_file.rb
Instance Attribute Summary collapse
-
#lock_file ⇒ Object
Returns the value of attribute lock_file.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ LockFile
constructor
A new instance of LockFile.
Constructor Details
#initialize(name, &block) ⇒ LockFile
Returns a new instance of LockFile.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/admit_one/lock_file.rb', line 8 def initialize(name,&block) @name = name if lock! then begin yield ensure unlock! end end end |
Instance Attribute Details
#lock_file ⇒ Object
Returns the value of attribute lock_file.
6 7 8 |
# File 'lib/admit_one/lock_file.rb', line 6 def lock_file @lock_file end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/admit_one/lock_file.rb', line 6 def name @name end |