CSV::Table deafault mode vs by_col_or_row

require ‘csv’

text = <<EOS
Available. Released 2013, November
Available. Released 2012, October
Available. Released 2012, January

option = { :col_sep => " " ,
:write_headers => " ",
:headers => [“avl”, “rels”, “year”, “month”]

csv = CSV.parse(text,option)
csv.inspect # => “#<CSV::Table mode:col_or_row row_count:4>”

From the inspection I can see, default mode is set to col_or_row. Then
why again the method CSV::Table#by_col_or_row

It seems to me to restore the default mode once some one will use
#by_row! or #by_col. Am I right or there is other factors involved ?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs