Class: Booth::Userland::Logins::Transitions::New::TimedOut

Inherits:
Object
  • Object
show all
Includes:
Concerns::Transition, Fallible
Defined in:
lib/booth/userland/logins/transitions/new/timed_out.rb

Instance Method Summary collapse

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/booth/userland/logins/transitions/new/timed_out.rb', line 10

def call
  debug { 'Stale session detected, you need to start all over again.' }

  fail_with :no_username_chosen, step: :enter_username,
                                 public_message:
end

#public_messageObject



17
18
19
# File 'lib/booth/userland/logins/transitions/new/timed_out.rb', line 17

def public_message
  I18n.t 'booth.login_timeout', lifespan_minutes: (storage.lifespan / 60)
end