File Coverage

blib/lib/Neo4j/Bolt/Relationship.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 20 20 100.0


line stmt bran cond sub pod time code
1             package Neo4j::Bolt::Relationship;
2             # ABSTRACT: Representation of Neo4j Relationship
3              
4             $Neo4j::Bolt::Relationship::VERSION = '0.40';
5              
6 6     6   70 use strict;
  6         12  
  6         175  
7 6     6   31 use warnings;
  6         11  
  6         724  
8              
9             sub as_simple {
10 2     2 1 5 my ($self) = @_;
11            
12 2 100       10 my %simple = defined $self->{properties} ? %{$self->{properties}} : ();
  1         6  
13 2         5 $simple{_relationship} = $self->{id};
14 2         3 $simple{_start} = $self->{start};
15 2         4 $simple{_end} = $self->{end};
16 2         3 $simple{_type} = $self->{type};
17 2         9 return \%simple;
18             }
19              
20             1;
21              
22             __END__