class Aeternitas::Guard::GuardIsLocked
Custom error class thrown when the lock can not be acquired @!attribute [r] timeout
@return [DateTime] the locks current timeout
Attributes
timeout[R]
Public Class Methods
new(resource_id, timeout, reason = nil)
click to toggle source
Calls superclass method
# File lib/aeternitas/guard.rb, line 191 def initialize(resource_id, timeout, reason = nil) msg = "Resource '#{resource_id}' is locked until #{timeout}." msg += " Reason: #{reason}" if reason super(msg) @timeout = timeout end