File Coverage

blib/lib/WWW/Hetzner/Cloud/Image.pm
Criterion Covered Total %
statement 6 8 75.0
branch n/a
condition n/a
subroutine 2 3 66.6
pod 1 1 100.0
total 9 12 75.0


line stmt bran cond sub pod time code
1             package WWW::Hetzner::Cloud::Image;
2             # ABSTRACT: Hetzner Cloud Image object
3              
4             our $VERSION = '0.100';
5              
6 25     25   154 use Moo;
  25         74  
  25         139  
7 25     25   8658 use namespace::clean;
  25         61  
  25         254  
8              
9              
10             has _client => (
11             is => 'ro',
12             required => 1,
13             weak_ref => 1,
14             init_arg => 'client',
15             );
16              
17             has id => ( is => 'ro' );
18              
19              
20             has name => ( is => 'ro' );
21              
22              
23             has description => ( is => 'ro' );
24              
25              
26             has type => ( is => 'ro' );
27              
28              
29             has status => ( is => 'ro' );
30              
31              
32             has os_flavor => ( is => 'ro' );
33              
34              
35             has os_version => ( is => 'ro' );
36              
37              
38             has architecture => ( is => 'ro' );
39              
40              
41             has disk_size => ( is => 'ro' );
42              
43              
44             has created => ( is => 'ro' );
45              
46              
47             has deprecated => ( is => 'ro' );
48              
49              
50             has labels => ( is => 'ro', default => sub { {} } );
51              
52              
53             sub data {
54 0     0 1   my ($self) = @_;
55             return {
56 0           id => $self->id,
57             name => $self->name,
58             description => $self->description,
59             type => $self->type,
60             status => $self->status,
61             os_flavor => $self->os_flavor,
62             os_version => $self->os_version,
63             architecture => $self->architecture,
64             disk_size => $self->disk_size,
65             created => $self->created,
66             deprecated => $self->deprecated,
67             labels => $self->labels,
68             };
69             }
70              
71              
72              
73             1.
74              
75             __END__