Class: Brigit::GitosisInventory

Inherits:
Inventory show all
Defined in:
lib/brigit/inventories/gitosis_inventory.rb

Instance Attribute Summary

Attributes inherited from Inventory

#path

Instance Method Summary collapse

Methods inherited from Inventory

#initialize

Methods included from Fallible

#fail

Methods included from Listable

included

Constructor Details

This class inherits a constructor from Brigit::Inventory

Instance Method Details

#repositoriesObject



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/brigit/inventories/gitosis_inventory.rb', line 8

def repositories
  @repositories ||= begin
    validate_path!
    sections.values.inject({}) do |all, section|
      %w(writable readonly).each do |field|
        tokenize(section[field]).each do |name|
          all[name] = repo_path(name)
        end
      end
      all
    end
  end
end