diff options
author | Luke Kanies <luke@madstop.com> | 2009-12-01 16:41:38 -0800 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-12-09 02:13:03 +1100 |
commit | 8971d8beae2c409f9052f27c3f80ad3bdfff4de2 (patch) | |
tree | c6f7eda0523c31c2b2f3a02b3761bf43ef716ebf /lib/puppet/util/rdoc/parser.rb | |
parent | 39d4a935d47f1d42241ce492c48818dc5b533c29 (diff) | |
download | puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.tar.gz puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.tar.xz puppet-8971d8beae2c409f9052f27c3f80ad3bdfff4de2.zip |
Fixing #2596 - Node, Class, Definition are not AST
This commit extracts these three classes into a single
ResourceType class in the Parser heirarchy, now completely
independent of the AST heirarchy.
Most of the other changes are just changing the interface
to the new class, which is greatly simplified over the previous
classes.
This opens up the possibility of drastically simplifying a lot
of this other code, too -- in particular, replacing the reference
to the parser with a reference to the (soon to be renamed)
LoadedCode class.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'lib/puppet/util/rdoc/parser.rb')
-rw-r--r-- | lib/puppet/util/rdoc/parser.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb index c2d307751..3f04fbf52 100644 --- a/lib/puppet/util/rdoc/parser.rb +++ b/lib/puppet/util/rdoc/parser.rb @@ -323,8 +323,8 @@ class Parser # that contains the documentation def parse_elements(container) Puppet.debug "rdoc: scanning manifest" - @ast.hostclasses.values.sort { |a,b| a.classname <=> b.classname }.each do |klass| - name = klass.classname + @ast.hostclasses.values.sort { |a,b| a.name <=> b.name }.each do |klass| + name = klass.name if klass.file == @input_file_name unless name.empty? document_class(name,klass,container) @@ -463,4 +463,4 @@ class Parser comment.sub!(/^#--.*/m, '') end end -end
\ No newline at end of file +end |