Class: MergeRequest::MetricsFinder
- Inherits:
-
Object
- Object
- MergeRequest::MetricsFinder
- Includes:
- Gitlab::Allowable
- Defined in:
- app/finders/merge_request/metrics_finder.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(current_user, params = {}) ⇒ MetricsFinder
constructor
A new instance of MetricsFinder.
Methods included from Gitlab::Allowable
Constructor Details
#initialize(current_user, params = {}) ⇒ MetricsFinder
Returns a new instance of MetricsFinder.
6 7 8 9 |
# File 'app/finders/merge_request/metrics_finder.rb', line 6 def initialize(current_user, params = {}) @current_user = current_user @params = params end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/finders/merge_request/metrics_finder.rb', line 11 def execute return klass.none if target_project.blank? || items = init_collection items = by_target_project(items) items = by_merged_after(items) by_merged_before(items) end |