Class: ApplicationsFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/applications_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ ApplicationsFinder

Returns a new instance of ApplicationsFinder.



6
7
8
# File 'app/finders/applications_finder.rb', line 6

def initialize(params = {})
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'app/finders/applications_finder.rb', line 4

def params
  @params
end

Instance Method Details

#executeObject



10
11
12
13
# File 'app/finders/applications_finder.rb', line 10

def execute
  applications = Doorkeeper::Application.where(owner_id: nil) # rubocop: disable CodeReuse/ActiveRecord
  by_id(applications)
end