File Coverage

blib/lib/Net/GitHub/V3/Gitignore.pm
Criterion Covered Total %
statement 9 21 42.8
branch 0 4 0.0
condition n/a
subroutine 3 5 60.0
pod 2 2 100.0
total 14 32 43.7


line stmt bran cond sub pod time code
1             package Net::GitHub::V3::Gitignore;
2              
3 1     1   4 use Moo;
  1         1  
  1         4  
4              
5             our $VERSION = '0.60';
6             our $AUTHORITY = 'cpan:FAYLAND';
7              
8 1     1   216 use URI::Escape;
  1         1  
  1         184  
9              
10             with 'Net::GitHub::V3::Query';
11              
12             sub templates {
13 0     0 1   my ( $self, $args ) = @_;
14              
15             # for old
16 0 0         unless (ref($args) eq 'HASH') {
17 0           $args = { type => $args };
18             }
19              
20 0           my $uri = URI->new('/gitignore/templates');
21 0           $uri->query_form($args);
22 0           return $self->query($uri->as_string);
23             }
24              
25             sub template {
26 0     0 1   my ( $self, $template, $args ) = @_;
27              
28             # for old
29 0 0         unless (ref($args) eq 'HASH') {
30 0           $args = { type => $args };
31             }
32              
33 0           my $uri = URI->new("/gitignore/templates/" . uri_escape($template));
34 0           $uri->query_form($args);
35 0           return $self->query($uri->as_string);
36             }
37              
38 1     1   4 no Moo;
  1         4  
  1         3  
39              
40             1;
41             __END__