Class: Projects::ExportJobFinder

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

Constant Summary collapse

InvalidExportJobStatusError =
Class.new(StandardError)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, params = {}) ⇒ ExportJobFinder

Returns a new instance of ExportJobFinder.


8
9
10
11
# File 'app/finders/projects/export_job_finder.rb', line 8

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

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params


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

def params
  @params
end

#projectObject (readonly)

Returns the value of attribute project


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

def project
  @project
end

Instance Method Details

#executeObject


13
14
15
16
17
18
# File 'app/finders/projects/export_job_finder.rb', line 13

def execute
  export_jobs = project.export_jobs
  export_jobs = by_status(export_jobs)

  export_jobs
end