blib/lib/Yukki/Model/Remote.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 39 CC 2 SCAR 11.0
CC
2
Cov
0%
remote_url
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.0
1 package Yukki::Model::Remove;
2 $Yukki::Model::Remove::VERSION = '0.991_007'; # TRIAL
3 $Yukki::Model::Remove::VERSION = '0.991007';
4 use v5.24;
5 use utf8;
6 use Moo;
7  
8 use Type::Utils;
9 use Types::Standard qw( Str );
10  
11 use namespace::clean;
12  
13 extends 'Yukki::Model';
14  
15 # ABSTRACT: model repsenting a repository remote
16  
17  
18 has name => (
19 is => 'ro',
20 isa => Str,
21 required => 1,
22 );
23  
24  
25 has repository => (
26 is => 'ro',
27 isa => class_type('Yukki::Model::Repository'),
28 required => 1,
29 handles => [ qw(
30 remote_config
31 update_remote_config
32 remove_remote_config
33 fetch_remote
34 ) ],
35 );
36  
37  
38 sub remote_url {
39 my ($self, $url) = @_;
40  
41 if (defined $url) {
42 $self->update_remote_config($self->name, $url);
43 }
44  
45 return $self->remote_config->{ $self->name };
46 }
47  
48  
49  
50  
51 1;
52  
53 __END__