Class: Shakha::Session

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/shakha/session.rb

Instance Method Summary collapse

Instance Method Details

#expired?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/shakha/session.rb', line 14

def expired?
  created_at < Shakha.config.session_lifetime.ago
end

#expires_atObject



18
19
20
# File 'app/models/shakha/session.rb', line 18

def expires_at
  created_at + Shakha.config.session_lifetime
end