Module: SimplestAuth::Session

Extended by:
ActiveSupport::Concern
Defined in:
lib/simplest_auth/session.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#initialize(attributes = {}) ⇒ Object



31
32
33
# File 'lib/simplest_auth/session.rb', line 31

def initialize(attributes = {})
  attributes.each {|k,v| send("#{k}=", v) }
end

#persisted?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/simplest_auth/session.rb', line 43

def persisted?
  false
end

#userObject



39
40
41
# File 'lib/simplest_auth/session.rb', line 39

def user
  @user ||= user_class.authenticate(email, password)
end

#user_classObject



35
36
37
# File 'lib/simplest_auth/session.rb', line 35

def user_class
  self.class.user_class
end