From 4e8c95efea596b95cb5d4d6544291a5f445dfab9 Mon Sep 17 00:00:00 2001 From: David Eisinger Date: Mon, 30 Oct 2023 23:41:01 -0400 Subject: [PATCH] refactor audio script --- bin/audio | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/audio b/bin/audio index efa33ee..2962a87 100755 --- a/bin/audio +++ b/bin/audio @@ -6,7 +6,7 @@ ARTIST = "David Eisinger" Config = Struct.new(:file, :title, :directory, :artist) -config = Config.new +config = Config.new(artist: ARTIST) parser = OptionParser.new do |opts| opts.banner = "Usage: bin/audio [options]" @@ -30,7 +30,6 @@ end begin parser.parse!(ARGV) - config.artist ||= ARTIST missing = config.to_h.filter_map { |k, v| k if v.nil? } raise OptionParser::MissingArgument.new(missing * ", ") unless missing.empty? rescue