Exception: Onboardable::StepError

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

Overview

Error raised when an invalid step is encountered within the onboarding process.

Instance Method Summary collapse

Constructor Details

#initialize(step, expected_steps) ⇒ StepError

Initializes a new StepError with details about the issue.

Parameters:

  • step (String)

    The invalid step that triggered the error.

  • expected_steps (Array<String>)

    The list of valid steps expected at this point.



44
45
46
# File 'lib/onboardable/errors.rb', line 44

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