Class: IssueCategoryCSVField
- Defined in:
- lib/gitlab-burndown/csv_field/category.rb
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(data_container) ⇒ IssueCategoryCSVField
constructor
A new instance of IssueCategoryCSVField.
Constructor Details
#initialize(data_container) ⇒ IssueCategoryCSVField
Returns a new instance of IssueCategoryCSVField.
4 5 6 |
# File 'lib/gitlab-burndown/csv_field/category.rb', line 4 def initialize(data_container) super(data_container) end |
Instance Method Details
#format ⇒ Object
8 9 10 11 12 13 |
# File 'lib/gitlab-burndown/csv_field/category.rb', line 8 def format category_label = @data_container['labels'].find { |label| label.include? 'Category::' } return 'Uncategorized' if category_label.nil? category_label.gsub('Category::', '') end |