Module: Mongoid::Archivable::Depot::ClassMethods
- Defined in:
- lib/mongoid/archivable/depot.rb
Instance Method Summary collapse
- #archive_client_name ⇒ Object
- #archive_database_name ⇒ Object
- #has_archive_client? ⇒ Boolean
- #has_archive_database? ⇒ Boolean
- #has_archive_storage? ⇒ Boolean
Instance Method Details
#archive_client_name ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/mongoid/archivable/depot.rb', line 30 def archive_client_name if has_archive_client? parent.archive_storage[:client] else Mongoid::Archivable.config.get_client end end |
#archive_database_name ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/mongoid/archivable/depot.rb', line 22 def archive_database_name if has_archive_database? parent.archive_storage[:database] else Mongoid::Archivable.config.get_database end end |
#has_archive_client? ⇒ Boolean
14 15 16 |
# File 'lib/mongoid/archivable/depot.rb', line 14 def has_archive_client? has_archive_storage? && !parent.archive_storage[:client].nil? end |
#has_archive_database? ⇒ Boolean
18 19 20 |
# File 'lib/mongoid/archivable/depot.rb', line 18 def has_archive_database? has_archive_storage? && !parent.archive_storage[:client].nil? end |
#has_archive_storage? ⇒ Boolean
10 11 12 |
# File 'lib/mongoid/archivable/depot.rb', line 10 def has_archive_storage? !parent.archive_storage.nil? end |