(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:
parent
1cdf7d41e9
commit
d15269458e
|
@ -6,34 +6,36 @@
|
|||
<% if !param[:exists?] %>
|
||||
<strike>
|
||||
<% end %>
|
||||
<span class="name"><%= param[:name] %></span>
|
||||
<%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %>
|
||||
<% if param[:types] %>
|
||||
<span class="type">
|
||||
( <% param[:types].each do |type| %>
|
||||
<tt>
|
||||
<% if param[:types].last != type %>
|
||||
<%= type %>,
|
||||
<% else %>
|
||||
<%= type %>
|
||||
<% end %>
|
||||
</tt>
|
||||
<% end %>)
|
||||
</span>
|
||||
<% end %>
|
||||
<% unless param[:module].nil? %>
|
||||
<tt><%= "=> #{param[:module]}" %></tt>
|
||||
<% end %>
|
||||
<% if param[:desc]%>
|
||||
—
|
||||
<div class="inline">
|
||||
<p><%= param[:desc] %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
</li>
|
||||
<% if !param[:exists] %>
|
||||
</strike>
|
||||
<% end %>
|
||||
<span class="name"><%= param[:name] %></span>
|
||||
<%# TODO: Linkify defaults that resolve to variable declarations in a different scope. %>
|
||||
<span class="type">
|
||||
<% if param[:types] %>
|
||||
(<% param[:types].each do |type| %>
|
||||
<tt>
|
||||
<% if param[:types].last != type %>
|
||||
<%= type %>,
|
||||
<% else %>
|
||||
<%= type %>
|
||||
<% end %>
|
||||
</tt>
|
||||
<% end %>)
|
||||
<% else %>
|
||||
<tt>(TBD)</tt>
|
||||
<% end %>
|
||||
</span>
|
||||
<% unless param[:module].nil? %>
|
||||
<tt><%= "=> #{param[:module]}" %></tt>
|
||||
<% end %>
|
||||
<% if param[:desc]%>
|
||||
—
|
||||
<div class="inline">
|
||||
<p><%= param[:desc] %></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if !param[:exists] %>
|
||||
</strike>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue