Class: Mutant::Mutation::Evil

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

Overview

Evul mutation

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)


14
15
16
# File 'lib/mutant/mutation/evil.rb', line 14

def identification
  "evil:#{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 killed mutation

  • (false)

    otherwise



31
32
33
# File 'lib/mutant/mutation/evil.rb', line 31

def success?(killer)
  killer.killed?
end