templates/rest/layout/html/setup.rb in yard-rest-plugin-0.2.3 vs templates/rest/layout/html/setup.rb in yard-rest-plugin-0.2.4
- old
+ new
@@ -10,14 +10,13 @@
@file = File.basename(@file)
sections :layout, [:diskfile]
elsif object
case object
when '_index.html'
- sections :layout, [:index]
+ sections :layout, [:index, [T('class')]]
when CodeObjects::Base
type = object.root? ? :module : object.type
- #sections :layout, [T(type), T('disqus')]
sections :layout, [T(type)]
end
else
sections :layout, [:contents]
end
@@ -27,19 +26,20 @@
@contents
end
def index
- legitimate_objects = @objects.reject {|o| o.root? || !is_class?(o) || o.tags('url').empty?}
- topic_objects = legitimate_objects.reject{|o| o.tags('topic').empty? }
+ legitimate_objects = index_objects(@objects).reject {|o| o.root? }
@topics = {}
-
- topic_objects.each do |object|
+
+ legitimate_objects.each do |object|
object.tags('topic').each { |topic| (@topics[topic.text] ||= []) << object }
end
@resources = legitimate_objects.sort_by {|o| o.tags('url').first.text }
-
+
+ @overall_objects = @objects.find_all {|o| o.has_tag?('overall')}.sort_by {|o| o.tag('overall').text}
+
erb(:index)
end
def diskfile
"<div id='filecontents'>" +
\ No newline at end of file