Class: Cutoff::CutoffExceededError
- Inherits:
-
Timeout::Error
- Object
- Timeout::Error
- Cutoff::CutoffExceededError
- Includes:
- CutoffError
- Defined in:
- lib/cutoff/error.rb
Overview
Raised by #checkpoint! if the time has been exceeded
Instance Attribute Summary collapse
-
#cutoff ⇒ Object
readonly
Returns the value of attribute cutoff.
Instance Method Summary collapse
-
#initialize(cutoff) ⇒ CutoffExceededError
constructor
A new instance of CutoffExceededError.
Constructor Details
#initialize(cutoff) ⇒ CutoffExceededError
Returns a new instance of CutoffExceededError.
23 24 25 26 27 28 29 30 31 |
# File 'lib/cutoff/error.rb', line 23 def initialize(cutoff) @cutoff = cutoff super(( 'Cutoff exceeded', allowed_seconds: cutoff.allowed_seconds, elapsed_seconds: cutoff.elapsed_seconds )) end |
Instance Attribute Details
#cutoff ⇒ Object (readonly)
Returns the value of attribute cutoff.
21 22 23 |
# File 'lib/cutoff/error.rb', line 21 def cutoff @cutoff end |