File Coverage

blib/lib/JMAP/Tester/WebSocket/Role/WebSocketResult.pm
Criterion Covered Total %
statement 8 10 80.0
branch n/a
condition 0 2 0.0
subroutine 3 4 75.0
pod 1 1 100.0
total 12 17 70.5


line stmt bran cond sub pod time code
1 1     1   3524 use v5.10.0;
  1         4  
2 1     1   6 use warnings;
  1         2  
  1         47  
3              
4             package JMAP::Tester::WebSocket::Role::WebSocketResult;
5             # ABSTRACT: the kind of thing that you get back for a WebSocket request
6             $JMAP::Tester::WebSocket::Role::WebSocketResult::VERSION = '0.001';
7 1     1   6 use Moo::Role;
  1         1  
  1         7  
8              
9             with 'JMAP::Tester::Role::Result';
10              
11             #pod =head1 OVERVIEW
12             #pod
13             #pod This is the role consumed by the class of any object returned by
14             #pod L's C method.
15             #pod
16             #pod =cut
17              
18             has ws_response => (
19             is => 'ro',
20             );
21              
22             #pod =method response_payload
23             #pod
24             #pod Returns the raw payload of the response, if there is one. Empty string
25             #pod otherwise.
26             #pod
27             #pod =cut
28              
29             sub response_payload {
30 0     0 1   my ($self) = @_;
31              
32 0   0       return $self->ws_response || '';
33             }
34              
35             1;
36              
37             __END__