NAME
Mojolicious::Plugin::LinkEmbedder::Link - Base class for links
ATTRIBUTES
media_id
Returns the part of the URL identifying the media. Default is empty string.
url
Holds a Mojo::URL object.
METHODS
is
$bool = $self->is($str);
$bool = $self->is('video');
$bool = $self->is('video-youtube');
Convertes $str
using "camelize" in Mojo::Util and checks if $self
is of that type:
$self->isa('Mojolicious::Plugin::LinkEmbedder::Link::' .Mojo::Util::camelize($_[1]));
learn
$self->learn($cb, @cb_args);
This method can be used to learn more information about the link. This class has no idea what to learn, so it simply calls the callback ($cb
) with @cb_args
.
pretty_url
Returns a pretty version of the "url". The default is to return a cloned version of "url".
to_embed
Returns a link to the "url", with target "_blank".
AUTHOR
Jan Henning Thorsen - jan.henning@thorsen.pm