Env.forScope constructor

Env.forScope(
  1. Map<String, String> map
)

Use this ctor for injecting an altered Environment into a Scope. The main use for this ctor is for testing.

Implementation

factory Env.forScope(Map<String, String> map) {
  final env = Env._internal();

  map.forEach((key, value) {
    env[key] = value;
  });
  return env;
}