2012-08-14 22:45:34 +02:00
|
|
|
module Mutant
|
2012-08-16 04:10:54 +02:00
|
|
|
# Runner that allows to mutate an entire project
|
2012-08-14 22:45:34 +02:00
|
|
|
class Runner
|
2013-02-01 23:06:07 +01:00
|
|
|
include Adamantium::Flat, AbstractType
|
2013-02-02 16:32:13 +01:00
|
|
|
extend MethodObject
|
2012-08-14 22:45:34 +02:00
|
|
|
|
2012-11-21 22:28:08 +01:00
|
|
|
# Return config
|
|
|
|
#
|
|
|
|
# @return [Mutant::Config]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
attr_reader :config
|
|
|
|
|
2012-09-16 00:51:47 +02:00
|
|
|
# Initialize object
|
2012-08-16 19:26:15 +02:00
|
|
|
#
|
2012-11-21 20:49:23 +01:00
|
|
|
# @param [Config] config
|
2012-08-16 19:26:15 +02:00
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2012-11-21 20:49:23 +01:00
|
|
|
def initialize(config)
|
2013-01-15 23:46:05 +01:00
|
|
|
@config = config
|
2012-08-14 22:45:34 +02:00
|
|
|
run
|
2013-01-15 23:46:05 +01:00
|
|
|
end
|
|
|
|
|
2013-02-01 23:06:07 +01:00
|
|
|
private
|
2012-08-14 22:45:34 +02:00
|
|
|
|
2013-02-01 23:06:07 +01:00
|
|
|
# Perform operation
|
2012-08-16 19:26:15 +02:00
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
2013-02-01 23:06:07 +01:00
|
|
|
abstract_method :run
|
2012-08-14 22:45:34 +02:00
|
|
|
|
2012-08-29 13:37:28 +02:00
|
|
|
end
|
|
|
|
end
|