Class: RDoc::Generator::SHtml::FilesTree
- Inherits:
-
Object
- Object
- RDoc::Generator::SHtml::FilesTree
- Defined in:
- lib/sdoc/generator/shtml.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
317 318 319 |
# File 'lib/sdoc/generator/shtml.rb', line 317 def children @children end |
Instance Method Details
#add(path, url) ⇒ Object
318 319 320 321 322 323 324 325 326 327 |
# File 'lib/sdoc/generator/shtml.rb', line 318 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 |