Class: WithAdvisoryLock::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/with_advisory_lock/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lock_was_acquired, result = false) ⇒ Result

Returns a new instance of Result.


7
8
9
10
# File 'lib/with_advisory_lock/base.rb', line 7

def initialize(lock_was_acquired, result = false)
  @lock_was_acquired = lock_was_acquired
  @result = result
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result


5
6
7
# File 'lib/with_advisory_lock/base.rb', line 5

def result
  @result
end

Instance Method Details

#lock_was_acquired?Boolean

Returns:

  • (Boolean)

12
13
14
# File 'lib/with_advisory_lock/base.rb', line 12

def lock_was_acquired?
  @lock_was_acquired
end