gitlab-org--gitlab-foss/app/models/conversational_development_index/card.rb
Taurie Davis, Simon Knox and Adam Niedzielski 26dde5f55f Add Conversational Development Index page to admin panel
2017-06-01 17:37:21 +02:00

26 lines
591 B
Ruby

module ConversationalDevelopmentIndex
class Card
attr_accessor :metric, :title, :description, :feature, :blog, :docs
def initialize(metric:, title:, description:, feature:, blog:, docs: nil)
self.metric = metric
self.title = title
self.description = description
self.feature = feature
self.blog = blog
self.docs = docs
end
def instance_score
metric.instance_score(feature)
end
def leader_score
metric.leader_score(feature)
end
def percentage_score
metric.percentage_score(feature)
end
end
end