The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

App::HomeBank2Ledger::Formatter - Abstract class for formatting a ledger

VERSION

version 0.008

SYNOPSIS

    my $formatter = App::HomeBank2Ledger::Formatter->new(
        type    => 'ledger',
    );
    print $formatter->format($ledger);

DESCRIPTION

This class formats ledger data as for a file.

ATTRIBUTES

type

Get the type of formatter.

name

Get the name or title of the ledger.

file

Get the filepath where the ledger data came from.

account_width

Get the number of characters to use for the account column.

METHODS

new

    $formatter = App::HomeBank2Ledger::Formatter->new(type => $format);

Construct a new formatter object.

format

    $str = $formatter->format($ledger);

Do the actual formatting of ledger data into a serialized form.

This must be overridden by subclasses.

SEE ALSO

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/homebank2ledger/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Charles McGarvey <chazmcgarvey@brokenzipper.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019 by Charles McGarvey.

This is free software, licensed under:

  The MIT (X11) License