Module: Deltacloud::CollectionMethods

Included in:
CIMI, Deltacloud
Defined in:
lib/deltacloud/helpers/collection_helper.rb

Overview

Collection methods that every frontend need to provide.

Instance Method Summary collapse

Instance Method Details

#collection_exists?(c) ⇒ Boolean

Simple check if the collection is available in the current frontend

Returns:

  • (Boolean)


36
37
38
# File 'lib/deltacloud/helpers/collection_helper.rb', line 36

def collection_exists?(c)
  collections.include? c
end

#collection_namesObject

Return all collection names provided by the current frontend



30
31
32
# File 'lib/deltacloud/helpers/collection_helper.rb', line 30

def collection_names
  module_klass::Collections.collection_names
end

#collectionsObject

Return all collections provided by the current frontend



24
25
26
# File 'lib/deltacloud/helpers/collection_helper.rb', line 24

def collections
  module_klass::Collections.collections
end