Class: Mutant::Meta::Example

Inherits:
Object
  • Object
show all
Includes:
Adamantium
Defined in:
lib/mutant/meta.rb,
lib/mutant/meta/example.rb,
lib/mutant/meta/example/dsl.rb

Overview

Mutation example

Defined Under Namespace

Classes: DSL, Verification

Constant Summary collapse

ALL =
[]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.add(&block) ⇒ 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.

Add example

Returns:

  • (undefined)


19
20
21
# File 'lib/mutant/meta.rb', line 19

def self.add(&block)
  ALL << DSL.run(block)
end

Instance Method Details

#generatedEmumerable<Parser::AST::Node>

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 generated mutations

Returns:

  • (Emumerable<Parser::AST::Node>)


24
25
26
# File 'lib/mutant/meta/example.rb', line 24

def generated
  Mutant::Mutator.each(node).to_a
end

#verificationVerification

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 a verification instance

Returns:



14
15
16
# File 'lib/mutant/meta/example.rb', line 14

def verification
  Verification.new(self, generated)
end