class Mutest::Meta::Example

Mutation example

Constants

ALL

rubocop:disable MutableConstant

Public Class Methods

add(type, &block) click to toggle source

Add example

@return [undefined]

# File lib/mutest/meta.rb, line 16
def self.add(type, &block)
  file = caller(1..1).first.split(':in', 2).first
  ALL << DSL.call(file, type, block)
end

Public Instance Methods

generated() click to toggle source

Generated mutations on example source

@return [Enumerable<Mutest::Mutation>]

# File lib/mutest/meta/example.rb, line 25
def generated
  Mutator.mutate(node).map do |node|
    Mutation::Evil.new(self, node)
  end
end
source() click to toggle source

Normalized source

@return [String]

# File lib/mutest/meta/example.rb, line 17
def source
  Unparser.unparse(node)
end
verification() click to toggle source

Verification instance for example

@return [Verification]

# File lib/mutest/meta/example.rb, line 10
def verification
  Verification.new(self, generated)
end