Class: MongoMS::MMS

Inherits:
Object
  • Object
show all
Includes:
HTTParty, Group
Defined in:
lib/mms-ruby.rb

Instance Method Summary collapse

Methods included from Group

#_get_group_by_name, #create_group, #delete_group, #group

Constructor Details

#initialize(u, p) ⇒ MMS

Returns a new instance of MMS.



10
11
12
13
14
# File 'lib/mms-ruby.rb', line 10

def initialize(u, p)
  @auth = {username: u, password: p}
  @options = { digest_auth: @auth, 
               headers: { 'Content-Type' => 'application/json' } }
end

Instance Method Details

#rootObject



16
17
18
# File 'lib/mms-ruby.rb', line 16

def root()
  self.class.get('', @options)
end

#throttling?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/mms-ruby.rb', line 20

def throttling?()
  root()['throttling']
end