Class: Booth::Onboardings::Step

Inherits:
Object
  • Object
show all
Includes:
MethodObject
Defined in:
lib/booth/onboardings/step.rb

Instance Method Summary collapse

Methods included from MethodObject

included

Instance Method Details

#callObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/booth/onboardings/step.rb', line 8

def call
  return :timed_out unless onboarding.recently_created?

  if onboarding.mode_first_time?
    mode_first_time
  elsif onboarding.mode_username_and_password?
    mode_username_and_password
  elsif onboarding.mode_username_password_and_otp?
    mode_username_password_and_otp
  elsif onboarding.mode_username_password_and_webauth?
    mode_username_password_and_webauth
  elsif onboarding.mode_username_and_webauth?
    mode_username_and_webauth
  else
    raise 'Invalid Onboarding State'
  end
end