NAME
Gitalist::Git::CollectionOfRepositories - Interface and partial implementation of a collection of git repositories
SYNOPSIS
package My::Example::CollectionOfRepositories;
use Moose::Role;
use namespace::autoclean;
with 'Gitalist::Git::CollectionOfRepositories';
sub _build_repositories {
my $self = shift;
[ $self->get_repository('Gitalist') ];
}
sub _get_path_for_repository_name {
my ($self, $name) = @_;
'/var/example/' . $name . '.git';
}
my $collection = My::Example::CollectionOfRepositories->new
my $repository_list = $collection->repositories;
my $only_repository = $repository_list->[0];
my $named_repository = $repo->get_repository('Gitalist');
DESCRIPTION
This role provides an abstraction for a list of Repository directories.
ATTRIBUTES
repositories
An array of all Gitalist::Git::Repositorys.
METHODS
get_repository (Str $name)
Returns a Gitalist::Git::Repository for the given name. If $name
is not a valid git repository an exception will be thrown.
SEE ALSO
Gitalist::Git::CollectionOfRepositories::FromListOfDirectories, Gitalist::Git::CollectionOfRepositories::FromDirectory, Gitalist::Git::Repository.
AUTHORS
See Gitalist for authors.
LICENSE
See Gitalist for the license.