class Hubba::Folio
Attributes
orgs[R]
repos[R]
Public Class Methods
new( h )
click to toggle source
# File lib/hubba/reports/folio.rb, line 33 def initialize( h ) @orgs = [] # orgs and users -todo/check: use better name - logins or owners? why? why not? @repos = [] add( h ) puts "#{@repos.size} repos @ #{@orgs.size} orgs" end
Public Instance Methods
add( h )
click to toggle source
private helpes
# File lib/hubba/reports/folio.rb, line 43 def add( h ) ## add repos.yml set h.each do |org_with_counter, names| ## remove optional number from key e.g. ## mrhydescripts (3) => mrhydescripts ## footballjs (4) => footballjs ## etc. org = org_with_counter.sub( /\([0-9]+\)/, '' ).strip repos = [] names.each do |name| repo = Repo.new( org, name ) repos << repo end @orgs << [org, repos] @repos += repos end end