summary refs log tree commit diff
path: root/lib/ballet/Markup.pm
blob: 8c8ed7526b80840814084872bd8dfd9f5d56187b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package ballet::Markup;

use Mouse::Role;

use Text::Textile qw/textile/;

sub convert {
    my ($self, $format, $content) = @_;

    my $method = '_to_'.$format;
    if ($self->meta->has_method($method)) {
        return $self->$method($content);
    }
}

sub _to_textile {
    my ($self, $content) = @_;
    textile($content);
}

1;