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