Class: Skunk::Command::Default

Inherits:
RubyCritic::Command::Default
  • Object
show all
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

Methods included from Shareable

#share, #sharing?

Constructor Details

#initialize(options) ⇒ Default



18
19
20
21
22
# File 'lib/skunk/commands/default.rb', line 18

def initialize(options)
  super
  @options = options
  @status_reporter = Skunk::Command::StatusReporter.new(options)
end

Instance Method Details

#executeSkunk::Command::StatusReporter

It generates a report and it returns an instance of Skunk::Command::StatusReporter



28
29
30
31
32
# File 'lib/skunk/commands/default.rb', line 28

def execute
  report(critique)

  status_reporter
end

#report(analysed_modules) ⇒ Object

It connects the Skunk::Command::StatusReporter with the collection of analysed modules.



38
39
40
41
42
# File 'lib/skunk/commands/default.rb', line 38

def report(analysed_modules)
  Reporter.generate_report(analysed_modules)

  status_reporter.analysed_modules = analysed_modules
end