Class: SignIn::RevokeSessionsForUser
- Inherits:
-
Object
- Object
- SignIn::RevokeSessionsForUser
- Defined in:
- app/services/sign_in/revoke_sessions_for_user.rb
Instance Attribute Summary collapse
-
#sessions ⇒ Object
readonly
Returns the value of attribute sessions.
-
#user_account ⇒ Object
readonly
Returns the value of attribute user_account.
Instance Method Summary collapse
- #delete_sessions! ⇒ Object private
-
#initialize(user_account:) ⇒ RevokeSessionsForUser
constructor
A new instance of RevokeSessionsForUser.
- #perform ⇒ Object
Constructor Details
#initialize(user_account:) ⇒ RevokeSessionsForUser
Returns a new instance of RevokeSessionsForUser.
7 8 9 |
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 7 def initialize(user_account:) @user_account = user_account end |
Instance Attribute Details
#sessions ⇒ Object (readonly)
Returns the value of attribute sessions.
5 6 7 |
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 5 def sessions @sessions end |
#user_account ⇒ Object (readonly)
Returns the value of attribute user_account.
5 6 7 |
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 5 def user_account @user_account end |
Instance Method Details
#delete_sessions! ⇒ Object (private)
17 18 19 |
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 17 def delete_sessions! OAuthSession.where(user_account:).destroy_all end |
#perform ⇒ Object
11 12 13 |
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 11 def perform delete_sessions! end |