API/Builder/FlexMessage.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.8
CC
2
Cov
0%
new
6.0
build
2.0
BEGIN
2.0
CRAP 3.6
1 package LINE::Bot::API::Builder::FlexMessage;
2  
3 use strict;
4 use warnings;
5  
6 sub new {
7 my ($class, %args) = @_;
8 die "`json` attribute is required" unless defined $args{json};
9 return bless { _json => $args{json} }, $class;
10 }
11  
12 sub build {
13 my ($self) = @_;
14 return $self->{_build} //= decode_json($self->{_json});
15 }
16  
17 1;
18  
19 __END__