Class: NoIncludeLabelsFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/gitlab-burndown/filter/no_include_labels.rb

Instance Method Summary collapse

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



9
10
11
12
13
# File 'lib/gitlab-burndown/filter/no_include_labels.rb', line 9

def apply(target)
  should_include = target['labels'].intersection(@labels).empty?
  warn "Excluding '#{target['title']}' due to label filter" unless should_include
  should_include
end