LinkEmbedder/Link/Whereby.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 28 CC 4 SCAR 28.0
CC
4
Cov
0%
learn_p
20.0
BEGIN
2.0
CRAP 16.4
1 package LinkEmbedder::Link::Whereby;
2 use Mojo::Base 'LinkEmbedder::Link';
3  
4 has provider_name => 'Whereby';
5 has provider_url => sub { Mojo::URL->new('https://whereby.com') };
6  
7 sub learn_p {
8 my $self = shift;
9 my $path = $self->url->path;
10 return $self->SUPER::learn_p unless @$path == 1;
11  
12 $self->{iframe_src} = "https://whereby.com/$path->[0]?embed";
13 $self->height(390) unless $self->height;
14 $self->width(740) unless $self->width;
15 $self->type('rich');
16 $self->template([__PACKAGE__, 'appearin.html.ep']);
17 $self->title("Join the room $path->[0]");
18  
19 return Mojo::Promise->new->resolve($self);
20 }
21  
22 1;
23  
24 __DATA__