Class: ActiveMutator::Mutation

Inherits:
Data
  • Object
show all
Defined in:
lib/active_mutator/mutation.rb

Overview

One concrete mutant. line is the 1-based line of the edit in the ORIGINAL file (used for coverage lookup and reporting).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#editObject (readonly)

Returns the value of attribute edit

Returns:

  • (Object)

    the current value of edit



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def edit
  @edit
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def line
  @line
end

#mutated_def_lineObject (readonly)

Returns the value of attribute mutated_def_line

Returns:

  • (Object)

    the current value of mutated_def_line



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def mutated_def_line
  @mutated_def_line
end

#mutated_def_sourceObject (readonly)

Returns the value of attribute mutated_def_source

Returns:

  • (Object)

    the current value of mutated_def_source



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def mutated_def_source
  @mutated_def_source
end

#mutated_file_sourceObject (readonly)

Returns the value of attribute mutated_file_source

Returns:

  • (Object)

    the current value of mutated_file_source



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def mutated_file_source
  @mutated_file_source
end

#original_snippetObject (readonly)

Returns the value of attribute original_snippet

Returns:

  • (Object)

    the current value of original_snippet



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def original_snippet
  @original_snippet
end

#subjectObject (readonly)

Returns the value of attribute subject

Returns:

  • (Object)

    the current value of subject



4
5
6
# File 'lib/active_mutator/mutation.rb', line 4

def subject
  @subject
end

Instance Method Details

#descriptionObject



6
# File 'lib/active_mutator/mutation.rb', line 6

def description = edit.description

#linesObject

Original-file lines the edit touches (edit may span lines).



9
# File 'lib/active_mutator/mutation.rb', line 9

def lines = line..(line + original_snippet.count("\n"))