Class: MetricAdapter::Metric
- Inherits:
-
Object
- Object
- MetricAdapter::Metric
- Defined in:
- lib/metric.rb
Overview
A normalized representation of a code metric.
Instance Attribute Summary collapse
-
#location ⇒ Object
Location where this metric applies.
-
#message ⇒ Object
Message indicating the issue being reported.
-
#score ⇒ Object
Optional score for for the metric indicating severity A score is not normalized across analyzers.
-
#signature ⇒ Object
Associated class and method signature.
Instance Method Summary collapse
-
#initialize(location, signature, message) ⇒ Metric
constructor
Create an instance of Metric.
Constructor Details
#initialize(location, signature, message) ⇒ Metric
Create an instance of Metric. ‘location` is expected to be a `Location` instance
21 22 23 24 25 26 |
# File 'lib/metric.rb', line 21 def initialize(location, signature, ) @location = location @signature = signature = @score = 0 end |
Instance Attribute Details
#location ⇒ Object
Location where this metric applies
7 8 9 |
# File 'lib/metric.rb', line 7 def location @location end |
#message ⇒ Object
Message indicating the issue being reported
13 14 15 |
# File 'lib/metric.rb', line 13 def end |
#score ⇒ Object
Optional score for for the metric indicating severity A score is not normalized across analyzers
17 18 19 |
# File 'lib/metric.rb', line 17 def score @score end |
#signature ⇒ Object
Associated class and method signature
10 11 12 |
# File 'lib/metric.rb', line 10 def signature @signature end |