mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 15:11:12 +08:00
Fix variables again
This commit is contained in:
parent
b6c3ca9b43
commit
3baada320e
@ -13,13 +13,7 @@ module Uplot
|
|||||||
def initialize
|
def initialize
|
||||||
@params = Params.new
|
@params = Params.new
|
||||||
|
|
||||||
@command = nil
|
|
||||||
@output = false
|
|
||||||
@count = false
|
|
||||||
@fmt = 'xyy'
|
|
||||||
|
|
||||||
@raw_inputs = []
|
@raw_inputs = []
|
||||||
@debug = false
|
|
||||||
|
|
||||||
@parser = Parser.new
|
@parser = Parser.new
|
||||||
end
|
end
|
||||||
@ -32,6 +26,10 @@ module Uplot
|
|||||||
delimiter = parser.delimiter
|
delimiter = parser.delimiter
|
||||||
transpose = parser.transpose
|
transpose = parser.transpose
|
||||||
headers = parser.headers
|
headers = parser.headers
|
||||||
|
output = parser.output
|
||||||
|
count = parser.count
|
||||||
|
fmt = parser.fmt
|
||||||
|
debug = parser.debug
|
||||||
|
|
||||||
if command == :colors
|
if command == :colors
|
||||||
Plot.colors
|
Plot.colors
|
||||||
@ -65,7 +63,7 @@ module Uplot
|
|||||||
raise "unrecognized plot_type: #{command}"
|
raise "unrecognized plot_type: #{command}"
|
||||||
end.render($stderr)
|
end.render($stderr)
|
||||||
|
|
||||||
print input if @output
|
print input if output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
module Uplot
|
module Uplot
|
||||||
class Command
|
class Command
|
||||||
class Parser
|
class Parser
|
||||||
attr_reader :command, :params, :main_parser, :sub_parsers, :delimiter, :transpose, :headers
|
attr_reader :command, :params, :main_parser, :sub_parsers,
|
||||||
|
:delimiter, :transpose, :headers, :output, :count, :fmt, :debug
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@sub_parsers = create_sub_parsers
|
@sub_parsers = create_sub_parsers
|
||||||
@ -12,6 +13,10 @@ module Uplot
|
|||||||
@delimiter = "\t"
|
@delimiter = "\t"
|
||||||
@transpose = false
|
@transpose = false
|
||||||
@headers = nil
|
@headers = nil
|
||||||
|
@output = false
|
||||||
|
@count = false
|
||||||
|
@fmt = 'xyy'
|
||||||
|
@debug = false
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_default_parser
|
def create_default_parser
|
||||||
|
Loading…
Reference in New Issue
Block a user