Add version number

This commit is contained in:
kojix2 2020-08-14 13:47:04 +09:00
parent 0fa1e37da7
commit ee74b32815

View File

@ -18,8 +18,10 @@ module Uplot
end
def create_parser
OptionParser.new
.on('-o', '--output', TrueClass) { |v| @output = v }
OptionParser.new do |opt|
opt.program_name = 'uplot'
opt.version = Uplot::VERSION
opt.on('-o', '--output', TrueClass) { |v| @output = v }
.on('-d', '--delimiter VAL', String) { |v| @delimiter = v }
.on('-H', '--headers', TrueClass) { |v| @headers = v }
.on('-T', '--transpose', TrueClass) { |v| @transpose = v }
@ -36,6 +38,7 @@ module Uplot
.on('--fmt VAL', String) { |v| @fmt = v }
.on('--debug', TrueClass) { |v| @debug = v }
end
end
def parse_options(argv)
main_parser = create_parser