Class: Stratum::Generator
- Inherits:
-
Thor
- Object
- Thor
- Stratum::Generator
- Defined in:
- lib/stratum/generator.rb
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/stratum/generator.rb', line 14 def install if install_path.exist? && ![:force] puts "Stratum installation already exists. Use -f to force" else copy_files puts "Stratum installed to #{install_path}" end end |
#remove(replace = false) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/stratum/generator.rb', line 29 def remove(replace = false) if stratum_exists? FileUtils.rm_rf("stratum") if replace copy_files puts "Stratum updated" else puts "Stratum has been removed" end else puts "Stratum installation is not found in current directory" end end |
#update ⇒ Object
24 25 26 |
# File 'lib/stratum/generator.rb', line 24 def update remove(true) end |