- merge doc strings with attributes properly

This commit is contained in:
Jordan Sissel 2013-01-02 01:14:33 -08:00
parent b151ec7d98
commit 97debf3c5e

View file

@ -73,7 +73,7 @@ class LogStashConfigDocGenerator
name, opts = eval(code)
description = BlueCloth.new(@comments.join("\n")).to_html
@attributes[name][:description] = description
@attributes[name.to_s][:description] = description
clear_comments
end # def add_config
@ -182,7 +182,9 @@ class LogStashConfigDocGenerator
# descriptions are assumed to be markdown
description = BlueCloth.new(@class_description).to_html
@attributes = klass.get_config
klass.get_config.each do |name, settings|
@attributes[name].merge!(settings)
end
sorted_attributes = @attributes.sort { |a,b| a.first.to_s <=> b.first.to_s }
klassname = LogStash::Config::Registry.registry[@name].to_s
name = @name