From 3c2b4bec43fe4941a81561f7827e04c766313314 Mon Sep 17 00:00:00 2001 From: Michael Witrant Date: Sun, 31 Mar 2013 17:00:28 +0200 Subject: [PATCH] accept args at any position --- extract_amendments.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extract_amendments.rb b/extract_amendments.rb index 2c93865..a565c3b 100755 --- a/extract_amendments.rb +++ b/extract_amendments.rb @@ -8,9 +8,9 @@ require 'nokogiri' xml_dump_path = nil -cli '--xml-dump' => lambda { |path| xml_dump_path = path } +extra_args = cli '--xml-dump' => lambda { |path| xml_dump_path = path } -opendocument_path = ARGV.first +opendocument_path = extra_args.first raise "usage: #$0 " unless opendocument_path xml = nil -- GitLab