Gitalist::Git::CollectionOfRepositories - Interface and partial implementation of a collection of git repositories


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 the Gitalist::Git::Repository manpages.


METHODS

get_repository (Str $name)

Returns a the Gitalist::Git::Repository manpage for the given name. If $name is not a valid git repository an exception will be thrown.


SEE ALSO

the Gitalist::Git::CollectionOfRepositories::FromListOfDirectories manpage, the Gitalist::Git::CollectionOfRepositories::FromDirectory manpage, the Gitalist::Git::Repository manpage.


AUTHORS

See Gitalist for authors.


LICENSE

See Gitalist for the license.

 Gitalist::Git::CollectionOfRepositories - Interface and partial implementation of a collection of git repositories