Class: Mutant::Meta::Example Private
- 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,
lib/mutant/meta/example/verification.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Mutation example
Defined Under Namespace
Classes: DSL, Expected, Verification
Constant Summary collapse
- ALL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
rubocop:disable Style/MutableConstant
[]
Class Method Summary collapse
-
.add(*types, &block) ⇒ undefined
private
Add example.
Instance Method Summary collapse
-
#generated ⇒ Enumerable<Mutant::Mutation>
private
Generated mutations on example source.
-
#original_source_generated ⇒ String
private
Original source as generated by unparser.
-
#verification ⇒ Verification
private
Verification instance for example.
Class Method Details
.add(*types, &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
19 20 21 22 |
# File 'lib/mutant/meta.rb', line 19 def self.add(*types, &block) file = caller.first.split(':in', 2).first ALL << DSL.call(file, Set.new(types), 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
39 40 41 42 43 |
# File 'lib/mutant/meta/example.rb', line 39 def generated Mutator.mutate(node).map do |node| Mutation::Evil.new(self, node) end end |
#original_source_generated ⇒ 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.
Original source as generated by unparser
31 32 33 |
# File 'lib/mutant/meta/example.rb', line 31 def original_source_generated 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
23 24 25 |
# File 'lib/mutant/meta/example.rb', line 23 def verification Verification.new(self, generated) end |