Class: Skunk::Command::Default
- Inherits:
-
RubyCritic::Command::Default
- Object
- RubyCritic::Command::Default
- Skunk::Command::Default
- Includes:
- Shareable
- Defined in:
- lib/skunk/commands/default.rb
Overview
Default command runs a critique using RubyCritic and uses Skunk::Command::StatusReporter to report status
Instance Method Summary collapse
-
#execute ⇒ Skunk::Command::StatusReporter
It generates a report and it returns an instance of Skunk::Command::StatusReporter.
-
#initialize(options) ⇒ Default
constructor
A new instance of Default.
-
#report(analysed_modules) ⇒ Object
It connects the Skunk::Command::StatusReporter with the collection of analysed modules.
Methods included from Shareable
Constructor Details
#initialize(options) ⇒ Default
Returns a new instance of Default.
19 20 21 22 23 |
# File 'lib/skunk/commands/default.rb', line 19 def initialize() super @options = @status_reporter = Skunk::Command::StatusReporter.new() end |
Instance Method Details
#execute ⇒ Skunk::Command::StatusReporter
It generates a report and it returns an instance of Skunk::Command::StatusReporter
29 30 31 32 33 34 35 |
# File 'lib/skunk/commands/default.rb', line 29 def execute RubyCritic::Config.formats = [] report(critique) status_reporter end |
#report(analysed_modules) ⇒ Object
It connects the Skunk::Command::StatusReporter with the collection of analysed modules.
41 42 43 44 |
# File 'lib/skunk/commands/default.rb', line 41 def report(analysed_modules) status_reporter.analysed_modules = analysed_modules status_reporter.score = analysed_modules.score end |