Class: PersonalAccessTokensFinder
- Inherits:
-
Object
- Object
- PersonalAccessTokensFinder
- Defined in:
- app/finders/personal_access_tokens_finder.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(params = {}, current_user = nil) ⇒ PersonalAccessTokensFinder
constructor
A new instance of PersonalAccessTokensFinder.
Constructor Details
#initialize(params = {}, current_user = nil) ⇒ PersonalAccessTokensFinder
Returns a new instance of PersonalAccessTokensFinder.
8 9 10 11 |
# File 'app/finders/personal_access_tokens_finder.rb', line 8 def initialize(params = {}, current_user = nil) @params = params @current_user = current_user end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
4 5 6 |
# File 'app/finders/personal_access_tokens_finder.rb', line 4 def params @params end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/finders/personal_access_tokens_finder.rb', line 13 def execute tokens = PersonalAccessToken.all tokens = by_current_user(tokens) tokens = by_user(tokens) tokens = by_users(tokens) tokens = by_impersonation(tokens) tokens = by_state(tokens) tokens = by_owner_type(tokens) tokens = by_revoked_state(tokens) tokens = by_created_before(tokens) tokens = by_created_after(tokens) tokens = by_last_used_before(tokens) tokens = by_last_used_after(tokens) tokens = by_search(tokens) sort(tokens) end |