mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-06-24 18:11:12 +08:00
Rename params -> plot_params
This commit is contained in:
parent
a5cdc94bb0
commit
5d1a4fdf3c
@ -15,7 +15,6 @@ module YouPlot
|
|||||||
|
|
||||||
def initialize(argv = ARGV)
|
def initialize(argv = ARGV)
|
||||||
@argv = argv
|
@argv = argv
|
||||||
@params = Params.new
|
|
||||||
@parser = Parser.new
|
@parser = Parser.new
|
||||||
@backend = YouPlot::Backends::UnicodePlotBackend
|
@backend = YouPlot::Backends::UnicodePlotBackend
|
||||||
end
|
end
|
||||||
@ -23,7 +22,7 @@ module YouPlot
|
|||||||
def run
|
def run
|
||||||
parser.parse_options(@argv)
|
parser.parse_options(@argv)
|
||||||
command = parser.command
|
command = parser.command
|
||||||
params = parser.params
|
@params = parser.params
|
||||||
delimiter = parser.delimiter
|
delimiter = parser.delimiter
|
||||||
transpose = parser.transpose
|
transpose = parser.transpose
|
||||||
headers = parser.headers
|
headers = parser.headers
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
require_relative 'params'
|
require_relative 'plot_params'
|
||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
class Command
|
class Command
|
||||||
@ -12,7 +12,7 @@ module YouPlot
|
|||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@command = nil
|
@command = nil
|
||||||
@params = Params.new
|
@params = PlotParams.new
|
||||||
|
|
||||||
@delimiter = "\t"
|
@delimiter = "\t"
|
||||||
@transpose = false
|
@transpose = false
|
||||||
|
@ -7,7 +7,7 @@ module YouPlot
|
|||||||
# * Here, I use Struct for 2 safety reason.
|
# * Here, I use Struct for 2 safety reason.
|
||||||
# * The keys are static in Struct.
|
# * The keys are static in Struct.
|
||||||
# * Struct does not conflict with keyword arguments. Hash dose.
|
# * Struct does not conflict with keyword arguments. Hash dose.
|
||||||
Params = Struct.new(
|
PlotParams = Struct.new(
|
||||||
# Sort me!
|
# Sort me!
|
||||||
:title,
|
:title,
|
||||||
:width,
|
:width,
|
Loading…
Reference in New Issue
Block a user