Class: Mongoid::Archivable::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/archivable/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject

Returns the value of attribute client.



5
6
7
# File 'lib/mongoid/archivable/config.rb', line 5

def client
  @client
end

#databaseObject

Returns the value of attribute database.



4
5
6
# File 'lib/mongoid/archivable/config.rb', line 4

def database
  @database
end

Instance Method Details

#get_clientObject



11
12
13
# File 'lib/mongoid/archivable/config.rb', line 11

def get_client
  client || :default
end

#get_databaseObject



7
8
9
# File 'lib/mongoid/archivable/config.rb', line 7

def get_database
  database || Mongoid::Config.clients[get_client][:database]
end