class JsDuck::Doc::Map
Helper for building at-tags lookup table.
Public Class Methods
build(docs)
click to toggle source
Builds map of at-tags for quick lookup
# File lib/jsduck/doc/map.rb, line 8 def self.build(docs) map = {} docs.each do |tag| if map[tag[:tagname]] map[tag[:tagname]] << tag else map[tag[:tagname]] = [tag] end end map end