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.



9
10
11
12
# File 'lib/with_advisory_lock/base.rb', line 9

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.



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

def result
  @result
end

Instance Method Details

#lock_was_acquired?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/with_advisory_lock/base.rb', line 14

def lock_was_acquired?
  @lock_was_acquired
end