File Coverage

blib/lib/WFA/Role/Response.pm
Criterion Covered Total %
statement 12 18 66.6
branch n/a
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 16 26 61.5


line stmt bran cond sub pod time code
1             package WFA::Role::Response;
2              
3 4     4   45412 use 5.008;
  4         13  
  4         150  
4 4     4   21 use strict;
  4         14  
  4         165  
5 4     4   23 use warnings;
  4         47  
  4         141  
6 4     4   19 use Moo::Role;
  4         5  
  4         26  
7              
8             has client => (
9             is => 'ro',
10             required => 1,
11             );
12              
13             has response => (
14             is => 'rw',
15             required => 1,
16             );
17              
18             sub actions {
19 0     0 0   my ($self) = @_;
20 0           my @actions = sort keys %{ $self->response()->{'atom:link'} };
  0            
21 0           return @actions;
22             };
23              
24             sub url_for_action {
25 0     0 0   my ($self, $action) = @_;
26 0           return $self->response()->{'atom:link'}->{$action}->{href};
27             }
28              
29             1;