Class: Moult::Report::Hotspot
- Inherits:
-
Object
- Object
- Moult::Report::Hotspot
- Defined in:
- lib/moult/report.rb
Overview
One ranked file.
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#churn ⇒ Object
readonly
Returns the value of attribute churn.
-
#complexity ⇒ Object
readonly
Returns the value of attribute complexity.
-
#confidence ⇒ Object
readonly
Returns the value of attribute confidence.
-
#fan_in ⇒ Object
readonly
Returns the value of attribute fan_in.
-
#fan_out ⇒ Object
readonly
Returns the value of attribute fan_out.
-
#instability ⇒ Object
readonly
Returns the value of attribute instability.
-
#methods ⇒ Object
readonly
Returns the value of attribute methods.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
-
#initialize(path:, score:, complexity:, churn:, methods:, fan_in: nil, fan_out: nil, instability: nil, confidence: nil, category: nil) ⇒ Hotspot
constructor
A new instance of Hotspot.
- #to_h ⇒ Object
-
#worst_method ⇒ Object
The single worst method in the file, for table drill-down.
Constructor Details
#initialize(path:, score:, complexity:, churn:, methods:, fan_in: nil, fan_out: nil, instability: nil, confidence: nil, category: nil) ⇒ Hotspot
Returns a new instance of Hotspot.
63 64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/moult/report.rb', line 63 def initialize(path:, score:, complexity:, churn:, methods:, fan_in: nil, fan_out: nil, instability: nil, confidence: nil, category: nil) @path = path @score = score @complexity = complexity @churn = churn @methods = methods @fan_in = fan_in @fan_out = fan_out @instability = instability @confidence = confidence @category = category end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def category @category end |
#churn ⇒ Object (readonly)
Returns the value of attribute churn.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def churn @churn end |
#complexity ⇒ Object (readonly)
Returns the value of attribute complexity.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def complexity @complexity end |
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def confidence @confidence end |
#fan_in ⇒ Object (readonly)
Returns the value of attribute fan_in.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def fan_in @fan_in end |
#fan_out ⇒ Object (readonly)
Returns the value of attribute fan_out.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def fan_out @fan_out end |
#instability ⇒ Object (readonly)
Returns the value of attribute instability.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def instability @instability end |
#methods ⇒ Object (readonly)
Returns the value of attribute methods.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def methods @methods end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def path @path end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
50 51 52 |
# File 'lib/moult/report.rb', line 50 def score @score end |
Instance Method Details
#to_h ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/moult/report.rb', line 82 def to_h { path: path, score: score, complexity: complexity, churn: churn, fan_in: fan_in, fan_out: fan_out, instability: instability, confidence: confidence, category: category, methods: methods.map(&:to_h) } end |
#worst_method ⇒ Object
The single worst method in the file, for table drill-down.
78 79 80 |
# File 'lib/moult/report.rb', line 78 def worst_method methods.first end |