Class: Skunk::Command::StatusReporter
- Inherits:
-
RubyCritic::Command::StatusReporter
- Object
- RubyCritic::Command::StatusReporter
- Skunk::Command::StatusReporter
- Defined in:
- lib/skunk/commands/status_reporter.rb
Overview
Knows how to report status for stinky files
Direct Known Subclasses
Constant Summary collapse
- HEADINGS =
%w[file skunk_score churn_times_cost churn cost coverage].freeze
- HEADINGS_WITHOUT_FILE =
HEADINGS - %w[file]
- HEADINGS_WITHOUT_FILE_WIDTH =
padding
HEADINGS_WITHOUT_FILE.size * 17
- TEMPLATE =
ERB.new(<<-TEMPL <%= _ttable %>\n SkunkScore Total: <%= total_skunk_score %> Modules Analysed: <%= analysed_modules_count %> SkunkScore Average: <%= skunk_score_average %> <% if worst %>Worst SkunkScore: <%= worst.skunk_score %> (<%= worst.pathname %>)<% end %> Generated with Skunk v<%= Skunk::VERSION %> TEMPL )
Instance Attribute Summary collapse
-
#analysed_modules ⇒ Object
Returns the value of attribute analysed_modules.
Instance Method Summary collapse
-
#update_status_message ⇒ Object
Returns a status message with a table of all analysed_modules and a skunk score average.
Instance Attribute Details
#analysed_modules ⇒ Object
Returns the value of attribute analysed_modules.
11 12 13 |
# File 'lib/skunk/commands/status_reporter.rb', line 11 def analysed_modules @analysed_modules end |
Instance Method Details
#update_status_message ⇒ Object
Returns a status message with a table of all analysed_modules and a skunk score average
30 31 32 33 34 35 36 |
# File 'lib/skunk/commands/status_reporter.rb', line 30 def opts = .merge(headings: HEADINGS, rows: table) _ttable = Terminal::Table.new(opts) @status_message = TEMPLATE.result(binding) end |