diff options
author | Patrick Spek <p.spek@tyil.nl> | 2017-04-26 07:53:25 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2017-04-26 07:53:25 +0200 |
commit | fd33799e2737e1fcce7b9bad44d0031f8dc9a2c9 (patch) | |
tree | 4f46c7db7ea84a59c90c1aa27289e448aed4cb38 /lib/Config.pm6 | |
parent | cac9a5f9e429d2461bd2830bc983eced5ef14e1a (diff) |
Add a .clear() to clear the config
Diffstat (limited to 'lib/Config.pm6')
-rw-r--r-- | lib/Config.pm6 | 7 |
1 files changed, 7 insertions, 0 deletions
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; |