Class: Watchr::FlogMetric::Report
- Inherits:
-
Flog
- Object
- Flog
- Watchr::FlogMetric::Report
- Defined in:
- lib/watchr/metrics/flog/report.rb
Overview
Seattle.rb Flog report.
Instance Method Summary collapse
-
#classes ⇒ Array.<FlogReportClass>
Get list of class reports.
- #classes_by_file(file) ⇒ Object
-
#initialize(files) ⇒ Report
constructor
Generate flog report for a given files.
-
#total_score ⇒ Number
Get total complexity score.
Constructor Details
#initialize(files) ⇒ Report
Generate flog report for a given files.
17 18 19 20 21 22 |
# File 'lib/watchr/metrics/flog/report.rb', line 17 def initialize(files) super(:continue => true) flog(files) process_result end |
Instance Method Details
#classes ⇒ Array.<FlogReportClass>
Get list of class reports.
38 39 40 |
# File 'lib/watchr/metrics/flog/report.rb', line 38 def classes @classes end |
#classes_by_file(file) ⇒ Object
42 43 44 |
# File 'lib/watchr/metrics/flog/report.rb', line 42 def classes_by_file(file) classes.find_all {|klass| klass.file == file} end |
#total_score ⇒ Number
Get total complexity score.
29 30 31 |
# File 'lib/watchr/metrics/flog/report.rb', line 29 def total_score (10 * total).round / 10.0 end |