Module: Tuxedo

Defined in:
lib/tuxedo.rb,
lib/tuxedo/cli.rb,
lib/tuxedo/tty.rb,
lib/tuxedo/error.rb,
lib/tuxedo/runner.rb,
lib/tuxedo/version.rb,
lib/tuxedo/outputter.rb,
lib/tuxedo/rake_task.rb,
lib/tuxedo/cane_parser.rb,
lib/tuxedo/reek_parser.rb,
lib/tuxedo/cane_violation.rb,
lib/tuxedo/formatters/base_formatter.rb,
lib/tuxedo/cane_violation/style_violation.rb,
lib/tuxedo/formatters/base_text_formatter.rb,
lib/tuxedo/formatters/cane_text_formatter.rb,
lib/tuxedo/cane_violation/syntax_violation.rb,
lib/tuxedo/cane_violation/abc_max_violation.rb,
lib/tuxedo/cane_violation/threshold_violation.rb,
lib/tuxedo/cane_violation/undocumented_class_violation.rb

Defined Under Namespace

Modules: Cli, Formatters, Runner, Tty Classes: CaneParser, CaneViolation, Error, Outputter, RakeTask, ReekParser

Constant Summary collapse

VERSION =
"0.9.2"

Class Method Summary collapse

Class Method Details

.output_to_consoleObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/tuxedo.rb', line 15

def self.output_to_console
  cane_violations = Runner.run_cane
  formatter = Formatters::CaneTextFormatter.new($stdout)
  formatter.format(cane_violations)
  puts ""

  rp = Tuxedo::ReekParser.new
  reek_output = Tuxedo::Runner.run_reek
  rp.parse_reek(reek_output)
  Tuxedo::Outputter.print_to_screen(rp.result) if rp.result.is_a? Hash
end