lib/dotter/utilities.rb in dotter_dotfiles-0.1.0 vs lib/dotter/utilities.rb in dotter_dotfiles-0.2.0

- old
+ new

@@ -19,7 +19,16 @@ @@dotter_path + '.dotter/gitrepos/' + package end def index_path(package) @@dotter_path + '.dotter/indexes/' + package end + def all_package_names + directory = Pathname.new(@@dotfiles_path) + directories = directory.children.select { |c| c.directory? } + package_names = [] + directories.each do |directory| + package_names.push(directory.basename) + end + package_names + end end end