Class: Projects::ExportJobFinder
- Inherits:
-
Object
- Object
- Projects::ExportJobFinder
- Defined in:
- app/finders/projects/export_job_finder.rb
Constant Summary collapse
- InvalidExportJobStatusError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, user, params = {}) ⇒ ExportJobFinder
constructor
A new instance of ExportJobFinder.
Constructor Details
#initialize(project, user, params = {}) ⇒ ExportJobFinder
Returns a new instance of ExportJobFinder.
8 9 10 11 12 |
# File 'app/finders/projects/export_job_finder.rb', line 8 def initialize(project, user, params = {}) @project = project @user = user @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'app/finders/projects/export_job_finder.rb', line 6 def params @params end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
6 7 8 |
# File 'app/finders/projects/export_job_finder.rb', line 6 def project @project end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'app/finders/projects/export_job_finder.rb', line 6 def user @user end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 |
# File 'app/finders/projects/export_job_finder.rb', line 14 def execute export_jobs = project.export_jobs.by_user_id(user.id) by_status(export_jobs) end |