From 22460f3689dc76f85d9702ad8b181993ef71acc0 Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Sat, 15 Aug 2020 19:41:53 +0900 Subject: [PATCH] Add raw_input variable --- lib/uplot/command.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/uplot/command.rb b/lib/uplot/command.rb index 7d5f74f..6932aa9 100644 --- a/lib/uplot/command.rb +++ b/lib/uplot/command.rb @@ -30,6 +30,7 @@ module Uplot end attr_accessor :params, :plot_type + attr_reader :raw_inputs def initialize(argv) @params = Params.new @@ -41,7 +42,10 @@ module Uplot @output = false @count = false @fmt = 'xyy' - @debug = false + + @raw_inputs = [] + @debug = false + parse_options(argv) end @@ -235,6 +239,7 @@ module Uplot # Sometimes the input file does not end with a newline code. while input = Kernel.gets(nil) input.freeze + @raw_inputs << input data, headers = preprocess(input) pp input: input, data: data, headers: headers if @debug case plot_type