|
|
@ -16,14 +16,21 @@ module Docs
|
|
|
|
def additional_entries
|
|
|
|
def additional_entries
|
|
|
|
return [] unless slug.start_with?('stdlib')
|
|
|
|
return [] unless slug.start_with?('stdlib')
|
|
|
|
|
|
|
|
|
|
|
|
css('.docstring-binding[id]').map do |node|
|
|
|
|
entries = []
|
|
|
|
|
|
|
|
used_names = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css('.docstring-binding[id]').each do |node|
|
|
|
|
name = node.content
|
|
|
|
name = node.content
|
|
|
|
name.gsub! '.:', '.'
|
|
|
|
name.gsub! '.:', '.'
|
|
|
|
name.remove! 'Base.'
|
|
|
|
name.remove! 'Base.'
|
|
|
|
category = node.parent.at_css('.docstring-category').content
|
|
|
|
category = node.parent.at_css('.docstring-category').content
|
|
|
|
name << '()' if category == 'Function' || category == 'Method'
|
|
|
|
name << '()' if category == 'Function' || category == 'Method'
|
|
|
|
[name, node['id']]
|
|
|
|
|
|
|
|
|
|
|
|
entries << [name, node['id']] unless used_names.key?(name)
|
|
|
|
|
|
|
|
used_names[name] = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
entries
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|