class Ardm::Property::Csv

Public Instance Methods

dump(value) click to toggle source
# File lib/ardm/property/csv.rb, line 23
def dump(value)
  case value
    when ::Array
      CSV.generate { |csv| value.each { |row| csv << row } }
    when ::String then value
  end
end
load(value) click to toggle source
# File lib/ardm/property/csv.rb, line 16
def load(value)
  case value
  when ::String then CSV.parse(value)
  when ::Array  then value
  end
end