Class: RakeGatling::Shell
- Inherits:
-
Object
- Object
- RakeGatling::Shell
- Defined in:
- lib/src/Shell.rb
Instance Method Summary collapse
- #execute(command) ⇒ Object
- #move_directory_contents_up(location) ⇒ Object
- #remove_directory(directory_name) ⇒ Object
Instance Method Details
#execute(command) ⇒ Object
3 4 5 |
# File 'lib/src/Shell.rb', line 3 def execute(command) puts `#{command}` end |
#move_directory_contents_up(location) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/src/Shell.rb', line 11 def move_directory_contents_up(location) directories = Dir.glob("#{location}/*") Dir.glob("#{location}/*/*") { |folder_object| mv File.(folder_object), location } directories.each do | directory | rm_rf File.(directory) end end |
#remove_directory(directory_name) ⇒ Object
7 8 9 |
# File 'lib/src/Shell.rb', line 7 def remove_directory(directory_name) rm_rf directory_name end |