Class: Mongoid::Shell::Commands::Mongorestore

Inherits:
Base
  • Object
show all
Includes:
Properties::Database, Properties::Password, Properties::Primary, Properties::Username
Defined in:
lib/mongoid/shell/commands/mongorestore.rb

Instance Attribute Summary collapse

Attributes included from Properties::Password

#password

Attributes included from Properties::Username

#username

Attributes included from Properties::Database

#db

Attributes included from Properties::Primary

#primary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#cmd, command_for, #to_s

Constructor Details

#initialize(attrs = {}) ⇒ Mongorestore

Returns a new instance of Mongorestore.



12
13
14
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 12

def initialize(attrs = {})
  super
end

Instance Attribute Details

#collectionObject

Returns the value of attribute collection.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def collection
  @collection
end

#dbpathObject

Returns the value of attribute dbpath.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def dbpath
  @dbpath
end

#directoryperdbObject

Returns the value of attribute directoryperdb.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def directoryperdb
  @directoryperdb
end

#dropObject

Returns the value of attribute drop.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def drop
  @drop
end

#filterObject

Returns the value of attribute filter.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def filter
  @filter
end

#hostObject

Returns the value of attribute host.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def host
  @host
end

#ipv6Object

Returns the value of attribute ipv6.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def ipv6
  @ipv6
end

#journalObject

Returns the value of attribute journal.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def journal
  @journal
end

#keepIndexVersionObject

Returns the value of attribute keepIndexVersion.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def keepIndexVersion
  @keepIndexVersion
end

#noIndexRestoreObject

Returns the value of attribute noIndexRestore.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def noIndexRestore
  @noIndexRestore
end

#objcheckObject

Returns the value of attribute objcheck.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def objcheck
  @objcheck
end

#oplogReplayObject

Returns the value of attribute oplogReplay.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def oplogReplay
  @oplogReplay
end

#restoreObject

Returns the value of attribute restore.



10
11
12
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 10

def restore
  @restore
end

Instance Method Details

#vargsObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/mongoid/shell/commands/mongorestore.rb', line 20

def vargs
  super({
    '--host' => :host,
    '--db' => :db,
    '--username' => :username,
    '--password' => :password,
    '--collection' => :collection,
    '--ipv6' => :ipv6,
    '--dbpath' => :dbpath,
    '--directoryperdb' => :directoryperdb,
    '--journal' => :journal,
    '--objcheck' => :objcheck,
    '--filter' => :filter,
    '--drop' => :drop,
    '--oplogReplay' => :oplogReplay,
    '--keepIndexVersion' => :keepIndexVersion,
    '--noIndexRestore' => :noIndexRestore,
    'directory or filename to restore from' => :restore
  })
end