lib/wgif/argument_parser.rb in wgif-0.5.3 vs lib/wgif/argument_parser.rb in wgif-0.5.4
- old
+ new
@@ -52,10 +52,16 @@
'--help',
'Print help information.') {
print_help
exit
}
+ opts.on_tail('-v',
+ '--version',
+ 'Print version.') {
+ print_version
+ exit
+ }
end
end
def parse(args)
options = parse_args(args)
@@ -77,9 +83,13 @@
end
def parse_options(args)
@parser.parse! args
@options
+ end
+
+ def print_version
+ puts "wgif #{WGif::VERSION}"
end
def print_help
puts 'Usage: wgif [YouTube URL] [output file] [options]', "\n"
puts argument_summary, "\n"