Skip to content

Commit

Permalink
start to document Pod classes
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 31, 2012
1 parent f1eb292 commit c386ae4
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 0 deletions.
40 changes: 40 additions & 0 deletions lib/Pod/Block.pod
@@ -0,0 +1,40 @@
=begin pod
=TITLE class Pod::Block
class Pod::Block { }
Class for a Pod block, and base class for most other Pod classes.
A Pod block has contents (more pod blocks or strings) and a config hash.
Useful subclasses:
=begin table
Class Used for
===== ========
L<Pod::Block::Para> paragraphs
L<Pod::Block::Named> named blocks
L<Pod::Block::Code> code blocks
L<Pod::Block::Comment> comments
L<Pod::Block::Heading> =head1 etc. headings
L<Pod::Item> list items
=end table
=head1 Methods
=head2 contents
method contents() returns Positional:D
Returns a list of contents of this block.
=head2 config
method config returns EnumMap:D
Returns a hash of configs.
=end pod
17 changes: 17 additions & 0 deletions lib/Pod/Block/Code.pod
@@ -0,0 +1,17 @@
=begin pod
=TITLE class Pod::Block::Code
class Pod::Block::Code is Pod::Block { }
Class for a code (verbatim) Pod block.
=head1 Methods
=head2 allowed
method allowed() returns Positional:D
Returns a list of formatting codes that are allowed inside the code block.
=end pod
23 changes: 23 additions & 0 deletions lib/Pod/Block/Named.pod
@@ -0,0 +1,23 @@
=begin pod
=TITLE class Pod::Block::Named
class Pod::Block::Named is Pod::Block { }
Class for a named Pod block. For example
=begin mysection
...
=end mysection
creates a C<Pod::Block::Named> with name C<mysection>.
=head1 Methods
=head2 name
method name() returns Str:D
Returns the name of the block.
=end pod
9 changes: 9 additions & 0 deletions lib/Pod/Block/Para.pod
@@ -0,0 +1,9 @@
=begin pod
=TITLE class Pod::Block::Para
class Pod::Block::Para is Pod::Block { }
Class for a Pod paragraph.
=end pod
17 changes: 17 additions & 0 deletions lib/Pod/Item.pod
@@ -0,0 +1,17 @@
=begin pod
=TITLE class Pod::Item
class Pod::Item is Pod::Block
Class for items in Pod enumeration lists.
=head1 Methods
=head2 level
method level() returns Int
Returns the level of the enumeration list, starting at 1.
=end pod

0 comments on commit c386ae4

Please sign in to comment.