File: InsertMoney.pm

package info (click to toggle)
libur-perl 0.470%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,192 kB
  • sloc: perl: 61,814; javascript: 255; xml: 108; sh: 13; makefile: 9
file content (25 lines) | stat: -rw-r--r-- 480 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package Vending::Command::InsertMoney;
use strict;
use warnings;

class Vending::Command::InsertMoney {
    is => 'Vending::Command',
    doc => 'Base abstract class for the money inserting commands',
    #is_abstract => 1,
    has => [
        name => { is => 'String'},  #, is_abstract => 1 },
    ]
};

sub execute {
    my $self = shift;

    my $name = $self->name();

    my $machine = $self->machine();
    my $worked =  $machine->insert($name);
    return $worked;
}

1;