opentox/opentox-ruby — Issue #9: serializer: fix csv export in development
Author: amaunz
Created: 2011-12-29 08:20:35+00:00
State: open

serializer returns whole URIs for feature names in csv and excel formats. Solution: shorten feature names to the last portion of the URI in Spreadsheets::to_csv and Spreadsheets::to_spreadsheet, e.g. similar to:

result = ""
rows = @rows.collect # not modify '@rows' by the shift cmd
result << rows.shift.collect { |f| f.split('/').last }.join(",") << "\n" # only feature name, not URI
result << rows.collect{ |r| r.join(", ") }.join("\n") # append rest