Class: DocmeCLI
- Inherits:
-
Thor
- Object
- Thor
- DocmeCLI
- Defined in:
- lib/docme/DocmeCLI.rb
Instance Method Summary collapse
Instance Method Details
#clean(path = nil) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/docme/DocmeCLI.rb', line 29 def clean(path = nil) path = Dir.pwd if path.nil? fail 'Please provide a valid path to a directory that contains a `docme_site` folder.' unless Dir.exist?(path + '/docme_site') puts '+ docme will clean ' + path if [:v] puts '+ docme cleaning' if [:v] clean_directory(path + '/docme_site', [:v]) Dir.rmdir(path + '/docme_site') if Dir.exist?(path + '/docme_site') puts '+ docme_site removed' if [:v] puts '+ docme is now homeless' if [:v] end |
#default ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/docme/DocmeCLI.rb', line 16 def default path = Dir.pwd puts "\n ***Begining docme magix***" docmeer = Docme.new(path, [:v], [:style], [:index], [:page]) docmeer.engage puts "\n ***Finished docme magic!***" puts "\n You can find your docs inside the `docme_site` folder. \n Hint: look for site_index.html\n\n" end |
#parse(path) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/docme/DocmeCLI.rb', line 62 def parse(path) puts "\n ***Begining docme magix***" docmeer = Docme.new(path, [:v], [:style], [:index], [:page]) docmeer.engage puts "\n ***Finished docme magic!***" puts "\n You can find your docs inside the `docme_site` folder. \n Hint: look for index.html\n\n" end |