mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 23:51:12 +08:00
Rename DSVReader to DSV
This commit is contained in:
parent
d6e1840e58
commit
fd7b755c79
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
require 'unicode_plot'
|
require 'unicode_plot'
|
||||||
require 'youplot/version'
|
require 'youplot/version'
|
||||||
require 'youplot/dsv_reader'
|
require 'youplot/dsv'
|
||||||
require 'youplot/command'
|
require 'youplot/command'
|
||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require_relative 'dsv_reader'
|
require_relative 'dsv'
|
||||||
require_relative 'command/parser'
|
require_relative 'command/parser'
|
||||||
|
|
||||||
# FIXME
|
# FIXME
|
||||||
@ -54,7 +54,7 @@ module YouPlot
|
|||||||
|
|
||||||
def read_dsv(input)
|
def read_dsv(input)
|
||||||
input = input.dup.force_encoding(options[:encoding]).encode('utf-8') if options[:encoding]
|
input = input.dup.force_encoding(options[:encoding]).encode('utf-8') if options[:encoding]
|
||||||
DSVReader.input(input, options[:delimiter], options[:headers], options[:transpose])
|
DSV.input(input, options[:delimiter], options[:headers], options[:transpose])
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_plot
|
def create_plot
|
||||||
|
@ -4,7 +4,7 @@ require 'csv'
|
|||||||
|
|
||||||
module YouPlot
|
module YouPlot
|
||||||
# Read and interpret Delimiter-separated values format file or stream.
|
# Read and interpret Delimiter-separated values format file or stream.
|
||||||
module DSVReader
|
module DSV
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
def input(input, delimiter, headers, transpose)
|
def input(input, delimiter, headers, transpose)
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
require_relative '../test_helper'
|
require_relative '../test_helper'
|
||||||
|
|
||||||
class YouPlotDSVReaderTest < Test::Unit::TestCase
|
class YouPlotDSVTest < Test::Unit::TestCase
|
||||||
def setup
|
def setup
|
||||||
@m = YouPlot::DSVReader
|
@m = YouPlot::DSV
|
||||||
end
|
end
|
||||||
|
|
||||||
test :transpose2 do
|
test :transpose2 do
|
||||||
|
Loading…
Reference in New Issue
Block a user