Class: Asciidoctor::Chart::PlainRubyCSV
- Inherits:
-
Object
- Object
- Asciidoctor::Chart::PlainRubyCSV
- Defined in:
- lib/asciidoctor/chart/plain_ruby_csv.rb
Class Method Summary collapse
Class Method Details
.parse(data) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/asciidoctor/chart/plain_ruby_csv.rb', line 6 def self.parse data result = [] data.each_line do |line| line_chomp = line.chomp result.push line_chomp.split ',' end result end |
.read(filename) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/asciidoctor/chart/plain_ruby_csv.rb', line 15 def self.read(filename) result = [] (File.open filename).each do |line| line_chomp = line.chomp result.push line_chomp.split ',' end result end |