Module: Trooper::DSL::Folders
- Included in:
- Action
- Defined in:
- lib/trooper/dsl/folders.rb
Instance Method Summary collapse
- #cd(path) ⇒ Object
- #create_folder(path) ⇒ Object (also: #mkdir)
- #create_folders(*folders) ⇒ Object
- #delete_folder(path) ⇒ Object
Instance Method Details
#cd(path) ⇒ Object
5 6 7 |
# File 'lib/trooper/dsl/folders.rb', line 5 def cd(path) run "cd #{path}" end |
#create_folder(path) ⇒ Object Also known as: mkdir
9 10 11 |
# File 'lib/trooper/dsl/folders.rb', line 9 def create_folder(path) run "mkdir -p #{path}" end |
#create_folders(*folders) ⇒ Object
18 19 20 |
# File 'lib/trooper/dsl/folders.rb', line 18 def create_folders(*folders) folders.each { |folder| create_folder folder } end |
#delete_folder(path) ⇒ Object
14 15 16 |
# File 'lib/trooper/dsl/folders.rb', line 14 def delete_folder(path) run "rm -rf #{path}" end |