Exception: Onboardable::LastStepError

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

Overview

Error raised when attempting to navigate beyond the last step in the onboarding process.

Instance Method Summary collapse

Constructor Details

#initialize(step, expected_steps) ⇒ LastStepError

Initializes a new LastStepError indicating that the end of the step sequence has been reached.

Parameters:

  • step (String)

    The last step that was attempted to be surpassed.

  • expected_steps (Array<String>)

    The complete list of valid steps in the onboarding process.



66
67
68
# File 'lib/onboardable/errors.rb', line 66

def initialize(step, expected_steps)
  super("Currently `#{step}` the last step. Available steps are: `#{expected_steps.join('`, `')}`.")
end