Exception: ConvenientService::Support::Counter::Exceptions::ValueAfterDecrementIsLowerThanMinValue Private

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from Exception

new

Instance Method Details

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • n (Integer)
  • current_value (Integer)
  • min_value (Integer)

Since:

  • 1.0.0



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/convenient_service/support/counter.rb', line 47

def initialize_with_kwargs(n:, current_value:, min_value:)
  message = <<~TEXT
    Value after decrement by `#{n}` is lower than the min value.

    Current value is `#{current_value}`.

    Min value is `#{min_value}`.
  TEXT

  initialize(message)
end