Class: NoIncludeLabelsFilter
- Defined in:
- lib/gitlab-burndown/filter/no_include_labels.rb
Instance Method Summary collapse
- #apply(target) ⇒ Object
- #include?(target) ⇒ Boolean
-
#initialize(*labels) ⇒ NoIncludeLabelsFilter
constructor
A new instance of NoIncludeLabelsFilter.
Constructor Details
#initialize(*labels) ⇒ NoIncludeLabelsFilter
Returns a new instance of NoIncludeLabelsFilter.
4 5 6 7 |
# File 'lib/gitlab-burndown/filter/no_include_labels.rb', line 4 def initialize(*labels) super() @labels = labels end |
Instance Method Details
#apply(target) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/gitlab-burndown/filter/no_include_labels.rb', line 13 def apply(target) return true if include? target warn "Excluding '#{target['title']}' due to label filter (#{target['web_url']})" false end |
#include?(target) ⇒ Boolean
9 10 11 |
# File 'lib/gitlab-burndown/filter/no_include_labels.rb', line 9 def include?(target) target['labels'].intersection(@labels).empty? end |