Loading lib/jsduck/event_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : ()" " : " + short_param_list(item) end end Loading lib/jsduck/method_table.rb +0 −8 Original line number Diff line number Diff line Loading @@ -13,14 +13,6 @@ module JsDuck def signature_suffix(item) short_param_list(item) + " : " + (item[:return] ? (item[:return][:type] || "void") : "void") end def short_param_list(item) params = item[:params].collect do |p| (p[:type] || "Object") + " " + (p[:name] || "") end return params.length > 0 ? ("( " + params.join(", ") + " )") : "()" end end end lib/jsduck/table.rb +8 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ module JsDuck return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>" + signature_suffix(item) end # Creates parameter list used in method and event signature. def short_param_list(item) params = item[:params].collect do |p| (p[:type] || "Object") + " " + (p[:name] || "") end return params.length > 0 ? ("( " + params.join(", ") + " )") : "()" end # 116 chars is also where ext-doc makes its cut, but unlike # ext-doc we only make the cut when there's more than 120 chars. # Loading Loading
lib/jsduck/event_table.rb +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ module JsDuck end def signature_suffix(item) " : ()" " : " + short_param_list(item) end end Loading
lib/jsduck/method_table.rb +0 −8 Original line number Diff line number Diff line Loading @@ -13,14 +13,6 @@ module JsDuck def signature_suffix(item) short_param_list(item) + " : " + (item[:return] ? (item[:return][:type] || "void") : "void") end def short_param_list(item) params = item[:params].collect do |p| (p[:type] || "Object") + " " + (p[:name] || "") end return params.length > 0 ? ("( " + params.join(", ") + " )") : "()" end end end
lib/jsduck/table.rb +8 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,14 @@ module JsDuck return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>" + signature_suffix(item) end # Creates parameter list used in method and event signature. def short_param_list(item) params = item[:params].collect do |p| (p[:type] || "Object") + " " + (p[:name] || "") end return params.length > 0 ? ("( " + params.join(", ") + " )") : "()" end # 116 chars is also where ext-doc makes its cut, but unlike # ext-doc we only make the cut when there's more than 120 chars. # Loading