1 package club.wpia.gigi.output.template;
3 import java.io.PrintWriter;
4 import java.util.HashMap;
7 import club.wpia.gigi.localisation.Language;
10 * Builds a variable scope around another {@link Outputable}, statically filling
13 public class Scope implements Outputable {
15 private Map<String, Object> vars;
17 private Outputable out;
20 * Creates a new {@link Scope}.
23 * the enclosed {@link Outputable}.
25 * the variables to assign in the inner scope.
27 public Scope(Outputable out, Map<String, Object> vars) {
33 public void output(PrintWriter out, Language l, Map<String, Object> vars) {
34 HashMap<String, Object> map = new HashMap<>();
36 map.putAll(this.vars);
37 this.out.output(out, l, map);