Class: CLI
- Inherits:
-
Object
- Object
- CLI
- Defined in:
- lib/cloud_backup/cli.rb
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cloud_backup/cli.rb', line 4 def initialize @dumper = Dumper.new puts 'What type of dump do you want?' puts '1. Auto Dump (Auto Dumps the Db and Stores it to Dropbox)' puts '2. Select dump file by yourself' dump_type = gets.strip case dump_type when '1' @dumper.dump_db() when '2' puts 'Please enter the dump file name.' file_name = gets.strip @dumper.upload_file file_name end end |