Exception: Onboardable::ComparisonResultError

Inherits:
Error
  • Object
show all
Defined in:
lib/onboardable/errors.rb

Overview

Error raised when an invalid comparison result is encountered.

Instance Method Summary collapse

Constructor Details

#initialize(comparison, expected_comparisons) ⇒ ComparisonResultError

Initializes a new ComparisonResultError with details about the issue.

Parameters:

  • comparison (Integer)

    The invalid comparison result that triggered the error.

  • expected_comparisons (Array<Integer>)

    The list of valid comparison results expected.



55
56
57
# File 'lib/onboardable/errors.rb', line 55

def initialize(comparison, expected_comparisons)
  super("Invalid comparison result: `#{comparison}`. Must be one of: #{expected_comparisons.join('`, `')}.")
end