free_mutant/lib/mutant/runner/subject.rb
2013-02-02 01:00:05 +01:00

44 lines
771 B
Ruby

module Mutant
class Runner
# Subject specific runner
class Subject < self
# Return mutation runners
#
# @return [Enumerable<Runner::Mutation>]
#
# @api private
#
attr_reader :mutations
# Initialize object
#
# @param [Configuration] config
# @param [Subject] subject
#
# @return [undefined]
#
# @api private
#
def initialize(config, subject)
@subject = subject
super(config)
end
private
# Perform operation
#
# @return [undefined]
#
# @api private
#
def run
@mutations = @subject.map do |mutation|
Mutation.new(config, mutation)
end
end
end
end
end