Class: JsDuck::Doc::Map
- Inherits:
-
Object
- Object
- JsDuck::Doc::Map
- Defined in:
- lib/jsduck/doc/map.rb
Overview
Helper for building at-tags lookup table.
Class Method Summary collapse
-
.build(docs) ⇒ Object
Builds map of at-tags for quick lookup.
Class Method Details
.build(docs) ⇒ Object
Builds map of at-tags for quick lookup
8 9 10 11 12 13 14 15 16 17 18 |
# 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 |