Class: Mongoid::Shell::Commands::Mongostat

Inherits:
Base
  • Object
show all
Includes:
Properties::Database, Properties::Host, Properties::Password, Properties::Username
Defined in:
lib/mongoid/shell/commands/mongostat.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::Host

#host

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#cmd, command_for, #to_s

Constructor Details

#initialize(attrs = {}) ⇒ Mongostat

Returns a new instance of Mongostat.



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

def initialize(attrs = {})
  super
end

Instance Attribute Details

#allObject

Returns the value of attribute all.



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

def all
  @all
end

#discoverObject

Returns the value of attribute discover.



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

def discover
  @discover
end

#httpObject

Returns the value of attribute http.



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

def http
  @http
end

#noheadersObject

Returns the value of attribute noheaders.



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

def noheaders
  @noheaders
end

#rowcountObject

Returns the value of attribute rowcount.



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

def rowcount
  @rowcount
end

Instance Method Details

#vargsObject



16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/mongoid/shell/commands/mongostat.rb', line 16

def vargs
  super({
    '--host' => :host,
    '--username' => :username,
    '--password' => :password,
    '--rowcount' => :rowcount,
    '--discover' => :discover,
    '--noheaders' => :noheaders,
    '--http' => :http,
    '--all' => :all
  })
end