Class: DesignManagement::DesignsFinder

Inherits:
Object
  • Object
show all
Includes:
FinderMethods, Gitlab::Allowable
Defined in:
app/finders/design_management/designs_finder.rb

Instance Method Summary collapse

Methods included from FinderMethods

#find, #find_by, #find_by!

Methods included from Gitlab::Allowable

#can?

Constructor Details

#initialize(issue, current_user, params = {}) ⇒ DesignsFinder

Params: ids: integer[] filenames: string[] visible_at_version: ?version filenames: String[]


13
14
15
16
17
# File 'app/finders/design_management/designs_finder.rb', line 13

def initialize(issue, current_user, params = {})
  @issue = issue
  @current_user = current_user
  @params = params
end

Instance Method Details

#executeObject


19
20
21
22
23
24
25
26
# File 'app/finders/design_management/designs_finder.rb', line 19

def execute
  items = init_collection

  items = by_visible_at_version(items)
  items = by_filename(items)
  items = by_id(items)
  items.ordered
end