Class: Stellr::Collections::MultiCollection
- Inherits:
-
SearchableCollection
- Object
- Base
- SearchableCollection
- Stellr::Collections::MultiCollection
- Defined in:
- lib/stellr/collections/multi_collection.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, collections, options = {}) ⇒ MultiCollection
constructor
A new instance of MultiCollection.
Methods inherited from SearchableCollection
#close, #highlight, #on_shutdown, #search, #size
Methods inherited from Base
#batch_finished, #close, create, #on_shutdown
Methods included from Utils::Observable
#add_listener, #listeners, #notify_listeners
Methods included from Utils::Shutdown
Constructor Details
#initialize(name, collections, options = {}) ⇒ MultiCollection
Returns a new instance of MultiCollection.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/stellr/collections/multi_collection.rb', line 7 def initialize( name, collections, = {} ) super name, @collections = {} collections.each do |collection| @collections[collection.name] = collection collection.add_listener do |event| handle_event(collection.name, event) end end end |