Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/copilot/csv.rb

Instance Method Summary collapse

Instance Method Details

#to_csv(options = {}) ⇒ Object



5
6
7
8
9
10
# File 'lib/copilot/csv.rb', line 5

def to_csv(options={})
  HashToCsv.to_csv self, options do |value|
    value = value.to_s.gsub "\n", ' '
    value.gsub(/ {2,}/, '')
  end
end