From fd33799e2737e1fcce7b9bad44d0031f8dc9a2c9 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Wed, 26 Apr 2017 07:53:25 +0200
Subject: Add a .clear() to clear the config
---
lib/Config.pm6 | 7 +++++++
1 file changed, 7 insertions(+)
(limited to 'lib')
diff --git a/lib/Config.pm6 b/lib/Config.pm6
index 372eb3b..d07c640 100644
--- a/lib/Config.pm6
+++ b/lib/Config.pm6
@@ -16,6 +16,13 @@ class Config is export
has $!path;
has $!parser;
+ method clear()
+ {
+ $!content = {};
+ $!path = "";
+ $!parser = "";
+ }
+
multi method get(Str $key, Any $default = Nil)
{
my $index = $!content;
--
cgit v1.1