Class: Issuables::LabelFilter
- Inherits:
-
BaseFilter
- Object
- BaseFilter
- Issuables::LabelFilter
- Extended by:
- Gitlab::Cache::RequestCache
- Includes:
- Gitlab::Utils::StrongMemoize
- Defined in:
- app/finders/issuables/label_filter.rb
Direct Known Subclasses
Constant Summary
Constants inherited from BaseFilter
BaseFilter::FILTER_ANY, BaseFilter::FILTER_NONE
Instance Attribute Summary
Attributes included from Gitlab::Cache::RequestCache
Attributes inherited from BaseFilter
Instance Method Summary collapse
- #filter(issuables) ⇒ Object
-
#initialize(project:, group:, **kwargs) ⇒ LabelFilter
constructor
A new instance of LabelFilter.
- #label_names_excluded_from_priority_sort ⇒ Object
Methods included from Gitlab::Cache::RequestCache
extended, request_cache, request_cache_key
Constructor Details
#initialize(project:, group:, **kwargs) ⇒ LabelFilter
Returns a new instance of LabelFilter.
8 9 10 11 12 13 |
# File 'app/finders/issuables/label_filter.rb', line 8 def initialize(project:, group:, **kwargs) @project = project @group = group super(**kwargs) end |
Instance Method Details
#filter(issuables) ⇒ Object
15 16 17 18 19 |
# File 'app/finders/issuables/label_filter.rb', line 15 def filter(issuables) filtered = by_label(issuables) filtered = by_label_union(filtered) by_negated_label(filtered) end |
#label_names_excluded_from_priority_sort ⇒ Object
21 22 23 |
# File 'app/finders/issuables/label_filter.rb', line 21 def label_names_excluded_from_priority_sort label_names_from_params end |