Loading lib/jsduck/tag_registry.rb +4 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ module JsDuck @html_renderers_sorted = false @member_types = [] @css = [] @class_icon_providers = [] @tags = [] instantiate_tags(TagLoader.new(load_paths).load_all) end Loading Loading @@ -76,9 +76,7 @@ module JsDuck @css << tag.css end if tag.class_icon @class_icon_providers << tag end @tags << tag end end Loading @@ -93,8 +91,8 @@ module JsDuck # (and in order they should be shown in). attr_reader :signatures # Array of tags which provide icons for classes. attr_reader :class_icon_providers # Array of all available tags attr_reader :tags # Same as #member_types, but returns just the names of member types. def member_type_names Loading lib/jsduck/web/class_icons.rb +6 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,12 @@ module JsDuck end def self.class_icon_providers @providers ||= TagRegistry.class_icon_providers.sort do |a, b| @providers ||= generate_class_icon_providers end # Find tags with #class_icon and sort them from highest priority to lowest def self.generate_class_icon_providers TagRegistry.tags.find_all {|t| t.class_icon }.sort do |a, b| a.class_icon[:priority] <=> b.class_icon[:priority] end.reverse end Loading Loading
lib/jsduck/tag_registry.rb +4 −6 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ module JsDuck @html_renderers_sorted = false @member_types = [] @css = [] @class_icon_providers = [] @tags = [] instantiate_tags(TagLoader.new(load_paths).load_all) end Loading Loading @@ -76,9 +76,7 @@ module JsDuck @css << tag.css end if tag.class_icon @class_icon_providers << tag end @tags << tag end end Loading @@ -93,8 +91,8 @@ module JsDuck # (and in order they should be shown in). attr_reader :signatures # Array of tags which provide icons for classes. attr_reader :class_icon_providers # Array of all available tags attr_reader :tags # Same as #member_types, but returns just the names of member types. def member_type_names Loading
lib/jsduck/web/class_icons.rb +6 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,12 @@ module JsDuck end def self.class_icon_providers @providers ||= TagRegistry.class_icon_providers.sort do |a, b| @providers ||= generate_class_icon_providers end # Find tags with #class_icon and sort them from highest priority to lowest def self.generate_class_icon_providers TagRegistry.tags.find_all {|t| t.class_icon }.sort do |a, b| a.class_icon[:priority] <=> b.class_icon[:priority] end.reverse end Loading