Method: Mutant::Env.empty

Defined in:
lib/mutant/env.rb

.empty(world, config) ⇒ Env

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Construct minimal empty env

rubocop:disable Metrics/MethodLength

Parameters:

Returns:



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/mutant/env.rb', line 31

def self.empty(world, config)
  new(
    config:,
    hooks:            Hooks.empty,
    integration:      Integration::Null.new(
      arguments:         EMPTY_ARRAY,
      expression_parser: config.expression_parser,
      world:
    ),
    matchable_scopes: EMPTY_ARRAY,
    mutations:        EMPTY_ARRAY,
    parser:           Parser.new,
    selector:         Selector::Null.new,
    subjects:         EMPTY_ARRAY,
    world:
  )
end