Class: Hubba::ReportSummary
Instance Method Summary collapse
Methods inherited from Report
Constructor Details
This class inherits a constructor from Hubba::Report
Instance Method Details
#build ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/hubba/reports.rb', line 31 def build ## create a (summary report) ## ## add stars, last_updates, etc. ## org description etc?? ## note: orgs is orgs+users e.g. geraldb, yorobot etc buf = String.new('') buf << "# #{@stats.repos.size} repos @ #{@stats.orgs.size} orgs\n" buf << "\n" @stats.orgs.each do |org| name = org[0] repos = org[1] buf << "### #{name} _(#{repos.size})_\n" buf << "\n" ### add stats for repos entries = [] repos.each do |repo| entries << "**#{repo.name}** ★#{repo.stats.stars} (#{repo.stats.size} kb)" end buf << entries.join( ' · ' ) ## use interpunct? - was: • (bullet) buf << "\n" buf << "\n" end buf end |