Module: DhEasy::Core::Plugin::CollectionVault
- Included in:
- ConfigBehavior
- Defined in:
- lib/dh_easy/core/plugin/collection_vault.rb
Instance Method Summary collapse
-
#add_collection(key, name) ⇒ Object
Add a new collection.
-
#collections ⇒ Object
Stored collections info as hash.
Instance Method Details
#add_collection(key, name) ⇒ Object
Add a new collection
14 15 16 17 18 19 |
# File 'lib/dh_easy/core/plugin/collection_vault.rb', line 14 def add_collection key, name if collections.has_key? key raise "Can't add \"#{key}\" collection, it already exists!" end collections[key] = name end |
#collections ⇒ Object
Stored collections info as hash.
6 7 8 |
# File 'lib/dh_easy/core/plugin/collection_vault.rb', line 6 def collections @collections ||= {} end |