Class: Veye::Github::ListCSV
- Defined in:
- lib/veye/views/github/list_csv.rb
Instance Method Summary collapse
- #format(results) ⇒ Object
-
#initialize ⇒ ListCSV
constructor
A new instance of ListCSV.
Methods inherited from BaseCSV
Constructor Details
#initialize ⇒ ListCSV
Returns a new instance of ListCSV.
6 7 8 9 10 |
# File 'lib/veye/views/github/list_csv.rb', line 6 def initialize headers = "nr,fullname,language,owner_login,owner_type,private,fork,\ branches,imported,description" super(headers) end |
Instance Method Details
#format(results) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/veye/views/github/list_csv.rb', line 12 def format(results) results['repos'].each_with_index do |result, index| printf("%d,%s,%s,%s,%s,%s,%s,%s,%s,%s\n", index + 1, result['fullname'], result['language'], result['owner_login'], result['owner_type'], result['private'], result['fork'], result['branches'].to_a.join('|'), result['imported'].to_a.join('|'), result['description'] ) end end |