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)


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

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

#expires_atObject



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

def expires_at
  created_at + Shakha.config.session_lifetime
end