templates/default/module/setup.rb in yard-slipstream-0.0.0 vs templates/default/module/setup.rb in yard-slipstream-0.1.1

- old
+ new

@@ -1,17 +1,17 @@ include Helpers::ModuleHelper def init sections \ - :box_info, :header, + :box_info, :children, :local_methods, :inherited_methods, # :method_summary, [:item_summary], :pre_docstring, T('docstring'), - :constant_summary, :inherited_constants, + :constant_summary, [T('docstring')], :inherited_constants, :attribute_summary, [:item_summary], :methodmissing, [T('method_details')], # :attribute_details, [T('method_details')], :method_details_list, [T('method_details')] end @@ -77,11 +77,11 @@ def sort_listing(list) list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] } end -def docstring_summary(obj) +def docstring_full(obj) docstring = "" if obj.tags(:overload).size == 1 && obj.docstring.empty? docstring = obj.tag(:overload).docstring else docstring = obj.docstring @@ -89,10 +89,14 @@ if docstring.summary.empty? && obj.tags(:return).size == 1 && obj.tag(:return).text docstring = Docstring.new(obj.tag(:return).text.gsub(/\A([a-z])/) {|x| x.upcase }.strip) end - docstring.summary + docstring +end + +def docstring_summary(obj) + docstring_full(obj).summary end def scopes(list) [:class, :instance].each do |scope| items = list.select {|m| m.scope == scope }