Class: Ci::BuildSourceFinder

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

Instance Method Summary collapse

Constructor Details

#initialize(relation:, sources:, project:, params: {}) ⇒ BuildSourceFinder

Returns a new instance of BuildSourceFinder.



5
6
7
8
9
10
# File 'app/finders/ci/build_source_finder.rb', line 5

def initialize(relation:, sources:, project:, params: {})
  @relation = relation
  @sources = sources
  @project = project
  @params = params
end

Instance Method Details

#executeObject



12
13
14
15
16
# File 'app/finders/ci/build_source_finder.rb', line 12

def execute
  return relation unless sources.present?

  filter_by_source
end