From d15269458e96d9a4c9eb01f9678d05a49a2c6523 Mon Sep 17 00:00:00 2001 From: Hailee Kenney Date: Thu, 18 Dec 2014 10:40:22 -0800 Subject: [PATCH] (PDOC-17) Add TBD for unspecified parameter types Prior to this commit if the type for a parameter was not specified in the comment, nothing would be printed. Since we'll soon be adding functionality which will determine the type programmatically, it made more since to leave a place holder rather than nothing at all. As such, the type is now listed as "TBD" if it is not specified by the user in the comment. --- .../definedtype/html/parameter_details.erb | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/lib/puppetx/puppetlabs/strings/yard/templates/default/definedtype/html/parameter_details.erb b/lib/puppetx/puppetlabs/strings/yard/templates/default/definedtype/html/parameter_details.erb index c27523b..b5753d4 100644 --- a/lib/puppetx/puppetlabs/strings/yard/templates/default/definedtype/html/parameter_details.erb +++ b/lib/puppetx/puppetlabs/strings/yard/templates/default/definedtype/html/parameter_details.erb @@ -6,34 +6,36 @@ <% if !param[:exists?] %> <% end %> - <%= param[:name] %> - <%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %> - <% if param[:types] %> - - ( <% param[:types].each do |type| %> - - <% if param[:types].last != type %> - <%= type %>, - <% else %> - <%= type %> - <% end %> - - <% end %>) - - <% end %> - <% unless param[:module].nil? %> - <%= "=> #{param[:module]}" %> - <% end %> - <% if param[:desc]%> - — -
-

<%= param[:desc] %>

-
- <% end %> - - <% if !param[:exists] %> -
- <% end %> + <%= param[:name] %> + <%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %> + + <% if param[:types] %> + (<% param[:types].each do |type| %> + + <% if param[:types].last != type %> + <%= type %>, + <% else %> + <%= type %> + <% end %> + + <% end %>) + <% else %> + (TBD) + <% end %> + + <% unless param[:module].nil? %> + <%= "=> #{param[:module]}" %> + <% end %> + <% if param[:desc]%> + — +
+

<%= param[:desc] %>

+
+ <% end %> + <% if !param[:exists] %> + + <% end %> + <% end %>