From 09271ab6c3711a635da78435fdc31656917b6d6a Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Thu, 30 Jul 2020 12:47:02 +0900 Subject: [PATCH] Minor fix --- lib/uplot/command.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 883b4cf..4964cb0 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -8,7 +8,7 @@ module Uplot def opt_new OptionParser.new do |opt| - opt.on('-o', '--output', TrueClass) { |v| @print = v } + opt.on('-o', '--output', TrueClass) { |v| @output = v } opt.on('-t', '--title VAL', String) { |v| @params[:title] = v } opt.on('-w', '--width VAL', Numeric) { |v| @params[:width] = v } opt.on('-h', '--height VAL', Numeric) { |v| @params[:height] = v } @@ -43,8 +43,6 @@ module Uplot parser.parse!(argv) unless argv.empty? end - def set_common_opts(opt); end - def run # Sometimes the input file does not end with a newline code. while input = Kernel.gets(nil) @@ -58,7 +56,7 @@ module Uplot lines(input_lines) end.render($stderr) - print input if @print + print input if @output end end