lib/output_mode/outputs/delimited.rb in output_mode-1.4.0 vs lib/output_mode/outputs/delimited.rb in output_mode-1.5.0
- old
+ new
@@ -38,10 +38,15 @@
# @see OutputMode::Output#render
# @see CSV
def render(*data)
io = StringIO.new
csv = CSV.new(io, **config)
- data.each { |d| csv << generate(d) }
+ data.each do |datum|
+ csv << generate(datum).map do |value|
+ next nil if value.nil?
+ value.to_s.dump[1...-1]
+ end
+ end
io.tap(&:rewind).read
end
end
end
end