Class: Ci::RunnerJobsFinder
- Inherits:
-
Object
- Object
- Ci::RunnerJobsFinder
- Defined in:
- app/finders/ci/runner_jobs_finder.rb
Constant Summary collapse
- ALLOWED_INDEXED_COLUMNS =
%w[id].freeze
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#runner ⇒ Object
readonly
Returns the value of attribute runner.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(runner, current_user, params = {}) ⇒ RunnerJobsFinder
constructor
A new instance of RunnerJobsFinder.
Constructor Details
#initialize(runner, current_user, params = {}) ⇒ RunnerJobsFinder
Returns a new instance of RunnerJobsFinder.
9 10 11 12 13 |
# File 'app/finders/ci/runner_jobs_finder.rb', line 9 def initialize(runner, current_user, params = {}) @runner = runner @user = current_user @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
5 6 7 |
# File 'app/finders/ci/runner_jobs_finder.rb', line 5 def params @params end |
#runner ⇒ Object (readonly)
Returns the value of attribute runner.
5 6 7 |
# File 'app/finders/ci/runner_jobs_finder.rb', line 5 def runner @runner end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 |
# File 'app/finders/ci/runner_jobs_finder.rb', line 15 def execute items = @runner.builds items = (items) items = by_status(items) sort_items(items) end |