Sha256: a72b17fa80ff269298768678d309d79ade005f00f094d6636a9334003cbbb1dc

Contents?: true

Size: 606 Bytes

Versions: 5

Compression:

Stored size: 606 Bytes

Contents

module DhEasy
  module Core
    module Plugin
      module CollectionVault
        # Stored collections info as hash.
        def collections
          @collections ||= {}
        end

        # Add a new collection
        #
        # @param [Symbol] key Collection key used to lookup for collection name.
        # @param [String] name Collection name used on outputs.
        def add_collection key, name
          if collections.has_key? key
            raise "Can't add \"#{key}\" collection, it already exists!"
          end
          collections[key] = name
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
dh_easy-core-0.3.4 lib/dh_easy/core/plugin/collection_vault.rb
dh_easy-core-0.3.3 lib/dh_easy/core/plugin/collection_vault.rb
dh_easy-core-0.3.2 lib/dh_easy/core/plugin/collection_vault.rb
dh_easy-core-0.3.1 lib/dh_easy/core/plugin/collection_vault.rb
dh_easy-core-0.2.2 lib/dh_easy/core/plugin/collection_vault.rb