From fe4bce0a44d12b8dd2c01c8c9f4f5d90b5684334 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Fri, 25 Oct 2019 13:21:22 +0200 Subject: [PATCH] gen-config: grooming --- src/gen-config.cr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gen-config.cr b/src/gen-config.cr index 0e46cbb..77e75e5 100644 --- a/src/gen-config.cr +++ b/src/gen-config.cr @@ -7,7 +7,7 @@ def sanitize_path(path) path.gsub /\/\/+/, "/" end -module Configure +module GenConfig def self.parse_options(unparsed : Array(String)) options = ARGV.map(&.split '=') @@ -32,10 +32,10 @@ module Configure end end -class Configure::Exception < Exception +class GenConfig::Exception < Exception end -class Configure::Context +class GenConfig::Context getter root : String def initialize(@root) @@ -116,11 +116,11 @@ end ARGV.shift ARGV.shift -options = Configure.parse_options ARGV +options = GenConfig.parse_options ARGV begin - Configure::Context.new("/").generate(template, target, options) -rescue e : Configure::Exception + GenConfig::Context.new("/").generate(template, target, options) +rescue e : GenConfig::Exception STDERR.puts "Fatal error: #{e.message}" exit 1 rescue e : Crinja::TypeError