Class: SimplyAuth::Session
- Defined in:
- app/models/simply_auth/session.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
Returns the value of attribute password.
-
#user ⇒ Object
Returns the value of attribute user.
-
#user_pool_id ⇒ Object
Returns the value of attribute user_pool_id.
Attributes inherited from Model
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
#attributes=, collection_path, #collection_path, create, #data, #data=, find, #initialize, instance_path, #instance_path, owner_class, path_component, #persisted=, #persisted?, #save
Constructor Details
This class inherits a constructor from SimplyAuth::Model
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'app/models/simply_auth/session.rb', line 3 def email @email end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'app/models/simply_auth/session.rb', line 3 def password @password end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'app/models/simply_auth/session.rb', line 3 def user @user end |
#user_pool_id ⇒ Object
Returns the value of attribute user_pool_id.
3 4 5 |
# File 'app/models/simply_auth/session.rb', line 3 def user_pool_id @user_pool_id end |
Class Method Details
.owner_class_name ⇒ Object
12 13 14 |
# File 'app/models/simply_auth/session.rb', line 12 def self.owner_class_name "UserPool" end |
Instance Method Details
#attributes ⇒ Object
6 7 8 |
# File 'app/models/simply_auth/session.rb', line 6 def attributes super.merge(email: email, password: password, id: id) end |
#destroy ⇒ Object
18 19 20 21 22 23 |
# File 'app/models/simply_auth/session.rb', line 18 def destroy response = RestClient.delete( "https://api.simplyauth.com#{instance_path}", accept: :json ) end |
#owner_id ⇒ Object
15 16 17 |
# File 'app/models/simply_auth/session.rb', line 15 def owner_id user_pool_id end |