Files
gitlabhq/app/models/global_label.rb
T
2015-11-16 14:07:38 +01:00

18 lines
312 B
Ruby

class GlobalLabel
attr_accessor :title, :labels
alias_attribute :name, :title
def self.build_collection(labels)
labels = labels.group_by(&:title)
labels.map do |title, label|
new(title, label)
end
end
def initialize(title, labels)
@title = title
@labels = labels
end
end