Class: MongoDbUtils::Tools::Restore
- Defined in:
- lib/mongo-db-utils/tools/commands.rb
Instance Method Summary collapse
- #cmd ⇒ Object
- #executable_cmd ⇒ Object
-
#initialize(host_and_port, db, source_folder, username = '', password = '') ⇒ Restore
constructor
A new instance of Restore.
Methods inherited from BaseCmd
Constructor Details
#initialize(host_and_port, db, source_folder, username = '', password = '') ⇒ Restore
Returns a new instance of Restore.
75 76 77 78 79 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 75 def initialize(host_and_port,db,source_folder,username = '', password = '') super('mongorestore', host_and_port, db, username, password) add_option('--drop') @source_folder = source_folder end |
Instance Method Details
#cmd ⇒ Object
81 82 83 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 81 def cmd "#{super} #{@source_folder}" end |
#executable_cmd ⇒ Object
85 86 87 |
# File 'lib/mongo-db-utils/tools/commands.rb', line 85 def executable_cmd "#{super} #{@source_folder}" end |