2018-08-03 13:22:24 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-09-10 14:08:54 -04:00
|
|
|
module DevOpsReport
|
2017-05-24 06:25:44 -04:00
|
|
|
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
|