Class: Mutant::Reporter::CLI::Printer::Mutation Private
- Inherits:
-
Mutant::Reporter::CLI::Printer
- Object
- Mutant::Reporter::CLI::Printer
- Mutant::Reporter::CLI::Printer::Mutation
- Defined in:
- lib/mutant/reporter/cli/printer/mutation.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Reporter for mutations
Constant Summary collapse
- NO_DIFF_MESSAGE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
<<~'MESSAGE' --- Internal failure --- BUG: A generated mutation did not result in exactly one diff hunk! This is an invariant violation by the mutation generation engine. Please report a reproduction to https://github.com/mbj/mutant Original unparsed source: %s Original AST: %s Mutated unparsed source: %s Mutated AST: %s MESSAGE
- SEPARATOR =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'-----------------------'
Constants inherited from Mutant::Reporter::CLI::Printer
Instance Method Summary collapse
- #original_node ⇒ Object private
- #print_no_diff_message ⇒ Object private
-
#run ⇒ undefined
private
Run report printer.
Methods inherited from Mutant::Reporter::CLI::Printer
Methods included from Procto
Instance Method Details
#original_node ⇒ Object
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.
50 51 52 |
# File 'lib/mutant/reporter/cli/printer/mutation.rb', line 50 def original_node object.subject.node end |
#print_no_diff_message ⇒ Object
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.
40 41 42 43 44 45 46 47 48 |
# File 'lib/mutant/reporter/cli/printer/mutation.rb', line 40 def info( NO_DIFF_MESSAGE, object.original_source, original_node.inspect, object.source, object.node.inspect ) end |
#run ⇒ undefined
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.
Run report printer
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/mutant/reporter/cli/printer/mutation.rb', line 29 def run diff = object.diff diff = color? ? diff.colorized_diff : diff.diff if diff output.write(diff) else end end |