Method: FileHandler#readProject
- Defined in:
- lib/phari_doc_gen/fileHandler.rb
#readProject(path) ⇒ Object
Read the ‘README.md’ file and generate descriprion
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/phari_doc_gen/fileHandler.rb', line 31 def readProject(path) projectDescription = '' if File.exists?(path + 'README.md') readme = File.new(path + 'README.md') projectDescription = readProjectDescription(readme) readme.close projectDescription elsif File.exists?(path + 'readme.md') readme = File.new(path + 'readme.md') projectDescription = readProjectDescription(readme) readme.close projectDescription else puts 'Warning: No readme.md file found.' end end |