Class: Distlock::Noop::ExclusiveLock
- Inherits:
-
Object
- Object
- Distlock::Noop::ExclusiveLock
- Defined in:
- lib/distlock/noop/exclusive_lock.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ExclusiveLock
constructor
A new instance of ExclusiveLock.
- #logger ⇒ Object
- #logger=(logger) ⇒ Object
- #with_lock(path = nil) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ ExclusiveLock
Returns a new instance of ExclusiveLock.
5 6 |
# File 'lib/distlock/noop/exclusive_lock.rb', line 5 def initialize(={}) end |
Instance Method Details
#logger ⇒ Object
12 13 14 |
# File 'lib/distlock/noop/exclusive_lock.rb', line 12 def logger @logger ||= Logger.new(STDOUT) end |
#logger=(logger) ⇒ Object
16 17 18 |
# File 'lib/distlock/noop/exclusive_lock.rb', line 16 def logger=(logger) @logger = logger end |
#with_lock(path = nil) ⇒ Object
8 9 10 |
# File 'lib/distlock/noop/exclusive_lock.rb', line 8 def with_lock(path=nil) yield if block_given? end |