Class: Mutant::Reporter::CLI::Printer::Mutation::Diff

Inherits:
Mutant::Reporter::CLI::Printer::Mutation show all
Defined in:
lib/mutant/reporter/cli/printer/mutation.rb

Overview

Reporter for neutral and evil mutations

Constant Summary

Constants inherited from Mutant::Reporter::CLI::Printer

REGISTRY

Instance Method Summary collapse

Methods inherited from Mutant::Reporter::CLI::Printer::Mutation

build, #run

Methods inherited from Mutant::Reporter::CLI::Printer

build, finalize, handle, run, visit

Instance Method Details

#detailsString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return diff

Returns:

  • (String)


91
92
93
94
95
# File 'lib/mutant/reporter/cli/printer/mutation.rb', line 91

def details
  original, current = mutation.original_source, mutation.source
  differ = Differ.build(original, current)
  color? ? differ.colorized_diff : differ.diff
end