Class: Mongoid::Shell::Commands::Mongo
- Defined in:
- lib/mongoid/shell/commands/mongo.rb
Instance Attribute Summary collapse
-
#eval ⇒ Object
Returns the value of attribute eval.
-
#ipv6 ⇒ Object
Returns the value of attribute ipv6.
-
#nodb ⇒ Object
Returns the value of attribute nodb.
-
#norc ⇒ Object
Returns the value of attribute norc.
-
#quiet ⇒ Object
Returns the value of attribute quiet.
Attributes included from Properties::Password
Attributes included from Properties::Username
Attributes included from Properties::Database
Attributes included from Properties::Primary
Attributes inherited from Base
Instance Method Summary collapse
- #host_port_and_db ⇒ Object
-
#initialize(attrs = {}) ⇒ Mongo
constructor
A new instance of Mongo.
- #vargs ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(attrs = {}) ⇒ Mongo
Returns a new instance of Mongo.
12 13 14 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 12 def initialize(attrs = {}) super end |
Instance Attribute Details
#eval ⇒ Object
Returns the value of attribute eval.
10 11 12 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 10 def eval @eval end |
#ipv6 ⇒ Object
Returns the value of attribute ipv6.
10 11 12 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 10 def ipv6 @ipv6 end |
#nodb ⇒ Object
Returns the value of attribute nodb.
10 11 12 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 10 def nodb @nodb end |
#norc ⇒ Object
Returns the value of attribute norc.
10 11 12 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 10 def norc @norc end |
#quiet ⇒ Object
Returns the value of attribute quiet.
10 11 12 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 10 def quiet @quiet end |
Instance Method Details
#host_port_and_db ⇒ Object
16 17 18 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 16 def host_port_and_db [primary, db].compact.join('/') end |
#vargs ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/mongoid/shell/commands/mongo.rb', line 20 def vargs super({ 'db address' => :host_port_and_db, '--username' => :username, '--password' => :password, '--eval' => :eval, '--nodb' => :nodb, '--norc' => :norc, '--quiet' => :quiet, '--ipv6' => :ipv6 }) end |