Exception: Cutoff::CutoffExceededError

Inherits:
CutoffError
  • Object
show all
Defined in:
lib/cutoff/error.rb

Overview

Raised by #checkpoint! if the time has been exceeded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cutoff) ⇒ CutoffExceededError

Returns a new instance of CutoffExceededError.



21
22
23
24
25
26
27
28
29
# File 'lib/cutoff/error.rb', line 21

def initialize(cutoff)
  @cutoff = cutoff

  super(message_with_meta(
    'Cutoff exceeded',
    allowed_seconds: cutoff.allowed_seconds,
    elapsed_seconds: cutoff.elapsed_seconds
  ))
end

Instance Attribute Details

#cutoffObject (readonly)

Returns the value of attribute cutoff.



19
20
21
# File 'lib/cutoff/error.rb', line 19

def cutoff
  @cutoff
end