File: Writer.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 (40 lines) | stat: -rw-r--r-- 732 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package UR::Doc::Writer;

use strict;
use warnings;

use UR;
our $VERSION = "0.47"; # UR $VERSION;
use Carp qw/croak/;

class UR::Doc::Writer {
    is => 'UR::Object',
    is_abstract => 1,
    has => [
        title => { is => 'Text', },
        sections => {
            is => 'UR::Doc::Section',
            is_many => 1,
        },
        navigation => {
            is => 'ARRAY',
            is_optional => 1,
        },
    ],
    has_transient_optional => [
        content => {
            is => 'Text',
            default_value => '',
        },
    ]
};

sub _append {
    my ($self, $data) = @_;
    $self->content($self->content . $data);
}

sub generate_index {
    my ($self, @command_trees) = @_;
    return '';
}