diff --git a/lib/youplot.rb b/lib/youplot.rb index 831c4e4..b2b926f 100644 --- a/lib/youplot.rb +++ b/lib/youplot.rb @@ -2,7 +2,7 @@ require 'unicode_plot' require 'youplot/version' -require 'youplot/dsv_reader' +require 'youplot/dsv' require 'youplot/command' module YouPlot diff --git a/lib/youplot/command.rb b/lib/youplot/command.rb index bc41a00..17c105a 100644 --- a/lib/youplot/command.rb +++ b/lib/youplot/command.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative 'dsv_reader' +require_relative 'dsv' require_relative 'command/parser' # FIXME @@ -54,7 +54,7 @@ module YouPlot def read_dsv(input) 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 def create_plot diff --git a/lib/youplot/dsv_reader.rb b/lib/youplot/dsv.rb similarity index 98% rename from lib/youplot/dsv_reader.rb rename to lib/youplot/dsv.rb index decad65..f0faa6c 100644 --- a/lib/youplot/dsv_reader.rb +++ b/lib/youplot/dsv.rb @@ -4,7 +4,7 @@ require 'csv' module YouPlot # Read and interpret Delimiter-separated values format file or stream. - module DSVReader + module DSV module_function def input(input, delimiter, headers, transpose) diff --git a/test/youplot/dev_reader_test.rb b/test/youplot/dev_reader_test.rb index f448250..30ffbd6 100644 --- a/test/youplot/dev_reader_test.rb +++ b/test/youplot/dev_reader_test.rb @@ -2,9 +2,9 @@ require_relative '../test_helper' -class YouPlotDSVReaderTest < Test::Unit::TestCase +class YouPlotDSVTest < Test::Unit::TestCase def setup - @m = YouPlot::DSVReader + @m = YouPlot::DSV end test :transpose2 do