Class: WithAdvisoryLock::Result
- Inherits:
-
Object
- Object
- WithAdvisoryLock::Result
- Defined in:
- lib/with_advisory_lock/base.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(lock_was_acquired, result = false) ⇒ Result
constructor
A new instance of Result.
- #lock_was_acquired? ⇒ Boolean
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
#result ⇒ Object (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
14 15 16 |
# File 'lib/with_advisory_lock/base.rb', line 14 def lock_was_acquired? @lock_was_acquired end |