Class: RDoc::Generator::SDoc::FilesTree
- Inherits:
-
Object
- Object
- RDoc::Generator::SDoc::FilesTree
- Defined in:
- lib/sdoc_local_editor/generator.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.
383 384 385 |
# File 'lib/sdoc_local_editor/generator.rb', line 383 def children @children end |
Instance Method Details
#add(path, url) ⇒ Object
384 385 386 387 388 389 390 391 392 393 |
# File 'lib/sdoc_local_editor/generator.rb', line 384 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 |