diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2009-11-04 20:21:16 +0100 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-11-12 08:05:50 +1100 |
commit | f05a04eabdee2299f884933010234358c41ac46d (patch) | |
tree | 093a6981570ef7ac90094be2e84e71d0e4f3c715 | |
parent | 38ec9fcc5f3965942a74c8d7b7dfd1cf1796c0df (diff) | |
download | puppet-f05a04eabdee2299f884933010234358c41ac46d.tar.gz puppet-f05a04eabdee2299f884933010234358c41ac46d.tar.xz puppet-f05a04eabdee2299f884933010234358c41ac46d.zip |
Fix #2784 - puppetdoc/rdoc didn't parse mono-instruction class content
class klass {
include a, b, c
}
wasn't producing any rdoc documentation.
We were thinking code was always embedded in an array which is not
the case for mono-instruction code.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
-rw-r--r-- | lib/puppet/util/rdoc/parser.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb index 97a245a14..fff8aab10 100644 --- a/lib/puppet/util/rdoc/parser.rb +++ b/lib/puppet/util/rdoc/parser.rb @@ -148,6 +148,7 @@ class Parser # create documentation for include statements we can find in +code+ # and associate it with +container+ def scan_for_include(container, code) + code = [code] unless code.is_a?(Array) code.each do |stmt| scan_for_include(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray) @@ -163,6 +164,7 @@ class Parser # create documentation for global variables assignements we can find in +code+ # and associate it with +container+ def scan_for_vardef(container, code) + code = [code] unless code.is_a?(Array) code.each do |stmt| scan_for_vardef(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray) @@ -176,6 +178,7 @@ class Parser # create documentation for resources we can find in +code+ # and associate it with +container+ def scan_for_resource(container, code) + code = [code] unless code.is_a?(Array) code.each do |stmt| scan_for_resource(container,stmt.children) if stmt.is_a?(Puppet::Parser::AST::ASTArray) |