]> git.donarmstrong.com Git - liborg-parser-perl.git/blob - lib/Org/Element/RadioTarget.pm
Import original source of Org-Parser 0.23
[liborg-parser-perl.git] / lib / Org / Element / RadioTarget.pm
1 package Org::Element::RadioTarget;
2
3 use 5.010;
4 use locale;
5 use Moo;
6 extends 'Org::Element';
7
8 our $VERSION = '0.23'; # VERSION
9
10 has target => (is => 'rw');
11
12 sub BUILD {
13     my ($self, $args) = @_;
14     my $pass = $args->{pass} // 1;
15     my $doc  = $self->document;
16     if ($pass == 1) {
17         push @{ $doc->radio_targets },
18             $self->target;
19     }
20 }
21
22 sub as_string {
23     my ($self) = @_;
24     join("",
25          "<<<", $self->target, ">>>");
26 }
27
28 1;
29 # ABSTRACT: Represent Org radio target
30
31
32 =pod
33
34 =head1 NAME
35
36 Org::Element::RadioTarget - Represent Org radio target
37
38 =head1 VERSION
39
40 version 0.23
41
42 =head1 DESCRIPTION
43
44 Derived from L<Org::Element>.
45
46 =head1 ATTRIBUTES
47
48 =head2 target
49
50 =head1 METHODS
51
52 =for Pod::Coverage as_string BUILD
53
54 =head1 AUTHOR
55
56 Steven Haryanto <stevenharyanto@gmail.com>
57
58 =head1 COPYRIGHT AND LICENSE
59
60 This software is copyright (c) 2012 by Steven Haryanto.
61
62 This is free software; you can redistribute it and/or modify it under
63 the same terms as the Perl 5 programming language system itself.
64
65 =cut
66
67
68 __END__
69