Class: Distlock::Noop::ExclusiveLock

Inherits:
Object
  • Object
show all
Defined in:
lib/distlock/noop/exclusive_lock.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ExclusiveLock

Returns a new instance of ExclusiveLock.



5
6
# File 'lib/distlock/noop/exclusive_lock.rb', line 5

def initialize(options={})
end

Instance Method Details

#loggerObject



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