Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
copyhacker committed May 21, 2014
1 parent 20bff2b commit be6e745
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/diligent/list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def as_hash

def as_json(filename = nil)
json = as_hash.to_json
# File.open(filename, 'w') { |f| f.write(json) } if filename
# json
write_to_file filename, json
end

Expand All @@ -54,11 +52,10 @@ def as_csv(filename = nil)
as_array.each { |row| csv << row }
end

# File.open(filename, 'w') { |f| f.write(csv) } if filename
write_to_file filename, csv
# csv
end


protected

def write_to_file(filename, content)
Expand Down

0 comments on commit be6e745

Please sign in to comment.