Class: Ci::PipelineSchedulesFinder

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project) ⇒ PipelineSchedulesFinder

Returns a new instance of PipelineSchedulesFinder.



7
8
9
10
# File 'app/finders/ci/pipeline_schedules_finder.rb', line 7

def initialize(project)
  @project = project
  @pipeline_schedules = project.pipeline_schedules
end

Instance Attribute Details

#pipeline_schedulesObject (readonly)

Returns the value of attribute pipeline_schedules.



5
6
7
# File 'app/finders/ci/pipeline_schedules_finder.rb', line 5

def pipeline_schedules
  @pipeline_schedules
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'app/finders/ci/pipeline_schedules_finder.rb', line 5

def project
  @project
end

Instance Method Details

#execute(scope: nil, ids: nil) ⇒ Object



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

def execute(scope: nil, ids: nil)
  items = pipeline_schedules
  items = by_ids(items, ids)
  items = by_scope(items, scope)

  sort_items(items)
end