|
|
@ -5,17 +5,20 @@ module Docs
|
|
|
|
if root_page?
|
|
|
|
if root_page?
|
|
|
|
at_css '#classindex-section'
|
|
|
|
at_css '#classindex-section'
|
|
|
|
else
|
|
|
|
else
|
|
|
|
container = at_css '#documentation'
|
|
|
|
container = at_css 'main'
|
|
|
|
|
|
|
|
|
|
|
|
# Add <dl> mentioning parent class and included modules
|
|
|
|
# Add <dl> mentioning parent class and included modules
|
|
|
|
meta = Nokogiri::XML::Node.new 'dl', doc
|
|
|
|
meta = Nokogiri::XML::Node.new 'dl', doc
|
|
|
|
meta['class'] = 'meta'
|
|
|
|
meta['class'] = 'meta'
|
|
|
|
|
|
|
|
|
|
|
|
if parent = at_css('#parent-class-section')
|
|
|
|
if parent = at_css('#parent-class-section')
|
|
|
|
meta << %(<dt>Parent:</dt><dd class="meta-parent">#{parent.at_css('.link').inner_html.strip}</dd>)
|
|
|
|
meta << %(<dt>Parent:</dt><dd class="meta-parent">#{parent.at_css('.link').inner_html.strip}</dd>)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
if includes = at_css('#includes-section')
|
|
|
|
if includes = at_css('#includes-section')
|
|
|
|
meta << %(<dt>Included modules:</dt><dd class="meta-includes">#{includes.css('a').map(&:to_html).join(', ')}</dd>)
|
|
|
|
meta << %(<dt>Included modules:</dt><dd class="meta-includes">#{includes.css('a').map(&:to_html).join(', ')}</dd>)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
container.at_css('h1').after(meta)
|
|
|
|
container.at_css('h1').after(meta)
|
|
|
|
|
|
|
|
|
|
|
|
container
|
|
|
|
container
|
|
|
|