Class: Mongoid::Archivable::Config
- Inherits:
-
Object
- Object
- Mongoid::Archivable::Config
- Defined in:
- lib/mongoid/archivable/config.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#database ⇒ Object
Returns the value of attribute database.
Instance Method Summary collapse
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/mongoid/archivable/config.rb', line 5 def client @client end |
#database ⇒ Object
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_client ⇒ Object
11 12 13 |
# File 'lib/mongoid/archivable/config.rb', line 11 def get_client client || :default end |
#get_database ⇒ Object
7 8 9 |
# File 'lib/mongoid/archivable/config.rb', line 7 def get_database database || Mongoid::Config.clients[get_client][:database] end |