Move memoizer into initializer
This commit is contained in:
parent
5fdaf9de15
commit
1007974267
1 changed files with 9 additions and 12 deletions
|
@ -180,17 +180,7 @@ module Mutant
|
||||||
@strategy = Strategy::Null.new
|
@strategy = Strategy::Null.new
|
||||||
@cache = Mutant::Cache.new
|
@cache = Mutant::Cache.new
|
||||||
parse(arguments)
|
parse(arguments)
|
||||||
config # trigger lazyness now
|
@config = Config.new(
|
||||||
end
|
|
||||||
|
|
||||||
# Return config
|
|
||||||
#
|
|
||||||
# @return [Config]
|
|
||||||
#
|
|
||||||
# @api private
|
|
||||||
#
|
|
||||||
def config
|
|
||||||
Config.new(
|
|
||||||
cache: @cache,
|
cache: @cache,
|
||||||
zombie: @zombie,
|
zombie: @zombie,
|
||||||
debug: @debug,
|
debug: @debug,
|
||||||
|
@ -201,7 +191,14 @@ module Mutant
|
||||||
expected_coverage: @expected_coverage
|
expected_coverage: @expected_coverage
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
memoize :config
|
|
||||||
|
# Return config
|
||||||
|
#
|
||||||
|
# @return [Config]
|
||||||
|
#
|
||||||
|
# @api private
|
||||||
|
#
|
||||||
|
attr_reader :config
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue