Move memoizer into initializer

This commit is contained in:
Markus Schirp 2014-06-15 19:30:17 +00:00
parent 5fdaf9de15
commit 1007974267

View file

@ -180,17 +180,7 @@ module Mutant
@strategy = Strategy::Null.new
@cache = Mutant::Cache.new
parse(arguments)
config # trigger lazyness now
end
# Return config
#
# @return [Config]
#
# @api private
#
def config
Config.new(
@config = Config.new(
cache: @cache,
zombie: @zombie,
debug: @debug,
@ -201,7 +191,14 @@ module Mutant
expected_coverage: @expected_coverage
)
end
memoize :config
# Return config
#
# @return [Config]
#
# @api private
#
attr_reader :config
private