NAME

Lego::Part::Image - Lego part image abstract class.

SYNOPSIS

 use Lego::Part::Image;
 my $obj = Lego::Part::Image->new;
 $obj->image;
 $obj->image_url;

METHODS

  • new()

     Constructor.
     Returns object.
    • part

       Lego::Part object.
       It is required.
       Default value is undef.
  • image()

     Abstract method for getting image.
  • image_url()

     Abstract method for getting image url.

ERRORS

 new():
         Parameter 'part' is required.
         Parameter 'part' must be Lego::Part object.
         From Class::Utils::set_params():
                 Unknown parameter '%s'.

 image():
         This is abstract class. image() method not implemented.

 image_url():
         This is abstract class. image_url() method not implemented.

EXAMPLE

 # Pragmas.
 use strict;
 use warnings;

 # Modules.
 use Lego::Part;
 use Lego::Part::Image;

 # Error pure setting.
 $ENV{'ERROR_PURE_TYPE'} = 'Print';

 # Object.
 my $obj = Lego::Part::Image->new(
         'part' => Lego::Part->new(
                'color' => 'red',
                'design_id' => '3002',
         ),
 );

 # Get image.
 $obj->image;

 # Output:
 # Lego::Part::Image: This is abstract class. image() method not implemented.

DEPENDENCIES

Class::Utils, Error::Pure, Readonly, Scalar::Util.

SEE ALSO

Lego::Part::Image::PeeronCom

Lego part image class for peeron.com.

Lego::Part::Image::LegoCom

Lego part image class for lego.com.

Lego::Part::Image::LugnetCom

Lego part image class for lugnet.com.

Task::Lego

Install the Lego modules.

REPOSITORY

https://github.com/tupinek/Lego-Part-Image

AUTHOR

Michal Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

 © 2015 Michal Špaček
 BSD 2-Clause License

VERSION

0.05