Exception: ConvenientService::Support::Counter::Exceptions::ValueAfterIncrementIsGreaterThanMaxValue

Inherits:
Exception
  • Object
show all
Defined in:
lib/convenient_service/support/counter.rb

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

#initialize_with_kwargs(n:, current_value:, max_value:) ⇒ void

This method returns an undefined value.

Parameters:

  • n (Integer)
  • current_value (Integer)
  • max_value (Integer)


22
23
24
25
26
27
28
29
30
31
32
# File 'lib/convenient_service/support/counter.rb', line 22

def initialize_with_kwargs(n:, current_value:, max_value:)
  message = "    Value after increment by `\#{n}` is greater than the max value.\n\n    Current value is `\#{current_value}`.\n\n    Max value is `\#{max_value}`.\n  TEXT\n\n  initialize(message)\nend\n"