mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-09-17 09:08:13 +08:00
Clarify the Output type a little
This commit is contained in:
@@ -182,9 +182,9 @@ module YouPlot
|
||||
|
||||
def output_plot(plot)
|
||||
case options[:output]
|
||||
when IO
|
||||
when IO, StringIO
|
||||
plot.render(options[:output])
|
||||
else
|
||||
when String, Tempfile
|
||||
File.open(options[:output], 'w') do |f|
|
||||
plot.render(f)
|
||||
end
|
||||
@@ -193,7 +193,7 @@ module YouPlot
|
||||
|
||||
def output_plot_progressive(plot)
|
||||
case options[:output]
|
||||
when IO
|
||||
when IO, StringIO
|
||||
# RefactorMe
|
||||
out = StringIO.new(String.new)
|
||||
def out.tty?
|
||||
|
Reference in New Issue
Block a user