Class: Mutant::Meta::Example
- Inherits:
-
Object
- Object
- Mutant::Meta::Example
- 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
-
.add(&block) ⇒ undefined
private
Add example.
Instance Method Summary collapse
-
#generated ⇒ Enumerable<Mutant::Mutation>
private
Generated mutations on example source.
-
#source ⇒ String
private
Normalized source.
-
#verification ⇒ Verification
private
Verification instance for example.
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
17 18 19 20 |
# File 'lib/mutant/meta.rb', line 17 def self.add(&block) file = caller.first.split(':in', 2).first ALL << DSL.run(file, block) end |
Instance Method Details
#generated ⇒ Enumerable<Mutant::Mutation>
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.
Generated mutations on example source
30 31 32 33 34 |
# File 'lib/mutant/meta/example.rb', line 30 def generated Mutator.each(node).map do |node| Mutation::Evil.new(self, node) end end |
#source ⇒ String
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.
Normalized source
20 21 22 |
# File 'lib/mutant/meta/example.rb', line 20 def source Unparser.unparse(node) end |
#verification ⇒ Verification
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.
Verification instance for example
11 12 13 |
# File 'lib/mutant/meta/example.rb', line 11 def verification Verification.new(self, generated) end |