File Coverage

blib/lib/WWW/VastAI/Object.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 2 2 100.0
total 14 14 100.0


line stmt bran cond sub pod time code
1             package WWW::VastAI::Object;
2             our $VERSION = '0.001';
3             # ABSTRACT: Base entity wrapper for Vast.ai API resources
4              
5 11     11   5472 use Moo;
  11         29  
  11         63  
6              
7             has _client => (
8             is => 'ro',
9             required => 1,
10             weak_ref => 1,
11             init_arg => 'client',
12             );
13              
14             has data => (
15             is => 'rw',
16             required => 1,
17             );
18              
19 21     21 1 324178 sub id { shift->data->{id} }
20 4     4 1 233 sub raw { shift->data }
21              
22             sub _replace_data {
23 3     3   13 my ($self, $data) = @_;
24 3         39 $self->data($data);
25 3         13 return $self;
26             }
27              
28             1;
29              
30             __END__