Class: DevOpsReport::Card

Inherits:
Object
  • Object
show all
Defined in:
app/models/dev_ops_report/card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric:, title:, description:, feature:, blog:, docs: nil) ⇒ Card

Returns a new instance of Card.


7
8
9
10
11
12
13
14
# File 'app/models/dev_ops_report/card.rb', line 7

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

Instance Attribute Details

#blogObject

Returns the value of attribute blog


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def blog
  @blog
end

#descriptionObject

Returns the value of attribute description


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def description
  @description
end

#docsObject

Returns the value of attribute docs


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def docs
  @docs
end

#featureObject

Returns the value of attribute feature


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def feature
  @feature
end

#metricObject

Returns the value of attribute metric


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def metric
  @metric
end

#titleObject

Returns the value of attribute title


5
6
7
# File 'app/models/dev_ops_report/card.rb', line 5

def title
  @title
end

Instance Method Details

#instance_scoreObject


16
17
18
# File 'app/models/dev_ops_report/card.rb', line 16

def instance_score
  metric.instance_score(feature)
end

#leader_scoreObject


20
21
22
# File 'app/models/dev_ops_report/card.rb', line 20

def leader_score
  metric.leader_score(feature)
end

#percentage_scoreObject


24
25
26
# File 'app/models/dev_ops_report/card.rb', line 24

def percentage_score
  metric.percentage_score(feature)
end