Loading lib/jsduck/cfg_table.rb +2 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,8 @@ module JsDuck @row_class = "config-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#cfg-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : #{item[:type]}" def signature_suffix(item) " : " + (item[:type] || "Object") end end Loading lib/jsduck/event_table.rb +2 −5 Original line number Diff line number Diff line Loading @@ -10,12 +10,9 @@ module JsDuck @row_class = "method-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#event-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : ()" def signature_suffix(item) " : ()" end end end lib/jsduck/method_table.rb +2 −5 Original line number Diff line number Diff line Loading @@ -10,11 +10,8 @@ module JsDuck @row_class = "method-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#method-" + id type = item[:return] ? (item[:return][:type] || "void") : "void" return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>() : #{type}" def signature_suffix(item) "() : " + (item[:return] ? (item[:return][:type] || "void") : "void") end end Loading lib/jsduck/property_table.rb +2 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,8 @@ module JsDuck @row_class = "property-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#prop-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : #{item[:type]}" def signature_suffix(item) " : " + (item[:type] || "Object") end end Loading lib/jsduck/table.rb +7 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ module JsDuck # Base class for creating HTML tables of class members. # # Subclasses must set variables @type, @id, @title, @column_title, # @row_class, and implement the signature() method. # @row_class, and implement the signature_suffix() method. class Table def initialize(cls) @cls = cls Loading Loading @@ -39,6 +39,12 @@ module JsDuck ].join("") end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>" + signature_suffix(item) 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/cfg_table.rb +2 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,8 @@ module JsDuck @row_class = "config-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#cfg-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : #{item[:type]}" def signature_suffix(item) " : " + (item[:type] || "Object") end end Loading
lib/jsduck/event_table.rb +2 −5 Original line number Diff line number Diff line Loading @@ -10,12 +10,9 @@ module JsDuck @row_class = "method-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#event-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : ()" def signature_suffix(item) " : ()" end end end
lib/jsduck/method_table.rb +2 −5 Original line number Diff line number Diff line Loading @@ -10,11 +10,8 @@ module JsDuck @row_class = "method-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#method-" + id type = item[:return] ? (item[:return][:type] || "void") : "void" return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>() : #{type}" def signature_suffix(item) "() : " + (item[:return] ? (item[:return][:type] || "void") : "void") end end Loading
lib/jsduck/property_table.rb +2 −4 Original line number Diff line number Diff line Loading @@ -10,10 +10,8 @@ module JsDuck @row_class = "property-row" end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#prop-" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b> : #{item[:type]}" def signature_suffix(item) " : " + (item[:type] || "Object") end end Loading
lib/jsduck/table.rb +7 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ module JsDuck # Base class for creating HTML tables of class members. # # Subclasses must set variables @type, @id, @title, @column_title, # @row_class, and implement the signature() method. # @row_class, and implement the signature_suffix() method. class Table def initialize(cls) @cls = cls Loading Loading @@ -39,6 +39,12 @@ module JsDuck ].join("") end def signature(item) id = @cls.full_name+ "-" + item[:name] src = "source/sample.html#" + id return "<a id='#{id}'></a><b><a href='#{src}'>#{item[:name]}</a></b>" + signature_suffix(item) 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