(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.
This commit is contained in:
Hailee Kenney 2014-12-18 10:40:22 -08:00
parent 1cdf7d41e9
commit d15269458e
1 changed files with 30 additions and 28 deletions

View File

@ -8,9 +8,9 @@
<% end %> <% end %>
<span class="name"><%= param[:name] %></span> <span class="name"><%= param[:name] %></span>
<%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %> <%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %>
<% if param[:types] %>
<span class="type"> <span class="type">
( <% param[:types].each do |type| %> <% if param[:types] %>
(<% param[:types].each do |type| %>
<tt> <tt>
<% if param[:types].last != type %> <% if param[:types].last != type %>
<%= type %>, <%= type %>,
@ -19,8 +19,10 @@
<% end %> <% end %>
</tt> </tt>
<% end %>) <% end %>)
</span> <% else %>
<tt>(TBD)</tt>
<% end %> <% end %>
</span>
<% unless param[:module].nil? %> <% unless param[:module].nil? %>
<tt><%= "=> #{param[:module]}" %></tt> <tt><%= "=> #{param[:module]}" %></tt>
<% end %> <% end %>
@ -30,10 +32,10 @@
<p><%= param[:desc] %></p> <p><%= param[:desc] %></p>
</div> </div>
<% end %> <% end %>
</li>
<% if !param[:exists] %> <% if !param[:exists] %>
</strike> </strike>
<% end %> <% end %>
</li>
<% end %> <% end %>
</ul> </ul>
</div> </div>