Method: RDoc::Generator::SHtml::FilesTree#add
- Defined in:
- lib/wpdoc/generator/shtml.rb
#add(path, url) ⇒ Object
325 326 327 328 329 330 331 332 333 334 |
# File 'lib/wpdoc/generator/shtml.rb', line 325 def add(path, url) path = path.split(File::SEPARATOR) unless Array === path @children ||= {} if path.length == 1 @children[path.first] = url else @children[path.first] ||= FilesTree.new @children[path.first].add(path[1, path.length], url) end end |