class Skunk::Cli::Command::Default
Default
command runs a critique using RubyCritic
and uses Skunk::Command::StatusReporter
to report status
Public Class Methods
new(options)
click to toggle source
Calls superclass method
# File lib/skunk/cli/commands/default.rb, line 20 def initialize(options) super @options = options @status_reporter = Skunk::Command::StatusReporter.new(options) end
Public Instance Methods
execute()
click to toggle source
It generates a report and it returns an instance of Skunk::Command::StatusReporter
@return [Skunk::Command::StatusReporter]
# File lib/skunk/cli/commands/default.rb, line 30 def execute RubyCritic::Config.formats = [] report(critique) status_reporter end
report(analysed_modules)
click to toggle source
It connects the Skunk::Command::StatusReporter
with the collection of analysed modules.
@param [RubyCritic::AnalysedModulesCollection] A collection of analysed modules
# File lib/skunk/cli/commands/default.rb, line 42 def report(analysed_modules) status_reporter.analysed_modules = analysed_modules status_reporter.score = analysed_modules.score end