Method: Doc::Documentor#build
- Defined in:
- lib/doc/documentor.rb
#build(update = false) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/doc/documentor.rb', line 49 def build(update = false) root_task = config(update) root_task.run if clean_after candidates = [] candidates += sources_dir.children if sources_dir.directory? candidates += docs_dir.children if docs_dir.directory? candidates.each do |dir| if started - dir.mtime > clean_after dir.rmtree_verbose end end end end |