module Lite::Report::Helpers::Converters
Private Instance Methods
convert_to_array!(row)
click to toggle source
# File lib/lite/report/helpers/converters.rb, line 10 def convert_to_array!(row) case row.class.name when 'CSV::Row' then row.fields else row end end
convert_to_hash!(row)
click to toggle source
# File lib/lite/report/helpers/converters.rb, line 17 def convert_to_hash!(row) case row.class.name when 'Array' then (0..(row.size - 1)).zip(row).to_h when 'CSV::Row' then row.to_hash else row end end