Exception: Onboardable::FirstStepError

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

Overview

Error raised when attempting to navigate before the first step in the onboarding process.

Instance Method Summary collapse

Constructor Details

#initialize(step, expected_steps) ⇒ FirstStepError

Initializes a new FirstStepError indicating that the beginning of the step sequence has been reached.

Parameters:

  • step (String)

    The first step that was attempted to be preceded.

  • expected_steps (Array<String>)

    The complete list of valid steps in the onboarding process.



77
78
79
# File 'lib/onboardable/errors.rb', line 77

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