Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactored for better naming

  • Loading branch information...
commit 04108b828560e3edd286e4f0f0464b72121843ae 1 parent af7934f
@michaelfeathers authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 writer_csv.rb
View
4 writer_csv.rb
@@ -1,6 +1,6 @@
def write_events file_name, field_names, events
- text = field_names.join( ',') + "\n"
- text += events.map { |e| field_names.map { |name| e.send(name).to_s }.join(',') }.join($/)
+ header = field_names.join( ',') + "\n"
+ rows = events.map { |e| field_names.map { |name| e.send(name).to_s }.join(',') }.join($/)
File.open(file_name + ".csv", 'w') { |f| f.write(text) }
end
Please sign in to comment.
Something went wrong with that request. Please try again.