Class: Mutant::Mutation::Neutral

Inherits:
Mutant::Mutation show all
Defined in:
lib/mutant/mutation/neutral.rb

Overview

Neutral mutation

Direct Known Subclasses

Noop

Defined Under Namespace

Classes: Noop

Constant Summary collapse

SYMBOL =
'neutral'

Instance Method Summary collapse

Methods inherited from Mutant::Mutation

#code, #insert, #original_source, #root, #source

Instance Method Details

#identificationString

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 identification

Returns:

  • (String)


23
24
25
# File 'lib/mutant/mutation/neutral.rb', line 23

def identification
  "#{self.class::SYMBOL}:#{super}"
end

#success?(killer) ⇒ true, false

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.

Test if killer is successful

Parameters:

Returns:

  • (true)

    if killer did NOT killed mutation

  • (false)

    otherwise



40
41
42
# File 'lib/mutant/mutation/neutral.rb', line 40

def success?(killer)
  !killer.killed?
end