From 5d1a4fdf3c8364d9c2b208808bb95d1c4829342a Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Mon, 14 Dec 2020 15:02:32 +0900 Subject: [PATCH] Rename params -> plot_params --- lib/youplot/command.rb | 3 +-- lib/youplot/command/parser.rb | 4 ++-- lib/youplot/command/{params.rb => plot_params.rb} | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) rename lib/youplot/command/{params.rb => plot_params.rb} (95%) diff --git a/lib/youplot/command.rb b/lib/youplot/command.rb index f935d5a..c59eeae 100644 --- a/lib/youplot/command.rb +++ b/lib/youplot/command.rb @@ -15,7 +15,6 @@ module YouPlot def initialize(argv = ARGV) @argv = argv - @params = Params.new @parser = Parser.new @backend = YouPlot::Backends::UnicodePlotBackend end @@ -23,7 +22,7 @@ module YouPlot def run parser.parse_options(@argv) command = parser.command - params = parser.params + @params = parser.params delimiter = parser.delimiter transpose = parser.transpose headers = parser.headers diff --git a/lib/youplot/command/parser.rb b/lib/youplot/command/parser.rb index c9370c1..866fe05 100644 --- a/lib/youplot/command/parser.rb +++ b/lib/youplot/command/parser.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'optparse' -require_relative 'params' +require_relative 'plot_params' module YouPlot class Command @@ -12,7 +12,7 @@ module YouPlot def initialize @command = nil - @params = Params.new + @params = PlotParams.new @delimiter = "\t" @transpose = false diff --git a/lib/youplot/command/params.rb b/lib/youplot/command/plot_params.rb similarity index 95% rename from lib/youplot/command/params.rb rename to lib/youplot/command/plot_params.rb index 3e93964..2f85592 100644 --- a/lib/youplot/command/params.rb +++ b/lib/youplot/command/plot_params.rb @@ -7,7 +7,7 @@ module YouPlot # * Here, I use Struct for 2 safety reason. # * The keys are static in Struct. # * Struct does not conflict with keyword arguments. Hash dose. - Params = Struct.new( + PlotParams = Struct.new( # Sort me! :title, :width,