Class: Ecoportal::API::Common::Content::CollectionModel
- Inherits:
-
DoubleModel
- Object
- BaseModel
- DoubleModel
- Ecoportal::API::Common::Content::CollectionModel
- Includes:
- Doc, DocMutation, Model, Modifiers, Mutation
- Defined in:
- lib/ecoportal/api/common/content/collection_model.rb,
lib/ecoportal/api/common/content/collection_model/doc.rb,
lib/ecoportal/api/common/content/collection_model/model.rb,
lib/ecoportal/api/common/content/collection_model/mutation.rb,
lib/ecoportal/api/common/content/collection_model/doc/items.rb,
lib/ecoportal/api/common/content/collection_model/modifiers.rb,
lib/ecoportal/api/common/content/collection_model/model/cache.rb,
lib/ecoportal/api/common/content/collection_model/model/items.rb,
lib/ecoportal/api/common/content/collection_model/doc_mutation.rb,
lib/ecoportal/api/common/content/collection_model/model/lookup.rb,
lib/ecoportal/api/common/content/collection_model/doc/rooted_key.rb,
lib/ecoportal/api/common/content/collection_model/model/iterable.rb,
lib/ecoportal/api/common/content/collection_model/mutation/clear.rb,
lib/ecoportal/api/common/content/collection_model/mutation/delete.rb,
lib/ecoportal/api/common/content/collection_model/mutation/upsert.rb,
lib/ecoportal/api/common/content/collection_model/model/numeric_key.rb,
lib/ecoportal/api/common/content/collection_model/model/var_tracking.rb,
lib/ecoportal/api/common/content/collection_model/doc_mutation/delete.rb,
lib/ecoportal/api/common/content/collection_model/doc_mutation/upsert.rb,
lib/ecoportal/api/common/content/collection_model/modifiers/items_key.rb,
lib/ecoportal/api/common/content/collection_model/doc_mutation/position.rb,
lib/ecoportal/api/common/content/collection_model/modifiers/items_klass.rb,
lib/ecoportal/api/common/content/collection_model/modifiers/items_order.rb
Overview
Note:
to be able to refer to the correct element of the Collection,
it is required that those elements have a unique key that allows to identify them
CollectionModel aims to deal with Arrays of actual objects.
Direct Known Subclasses
V2::Page::Component::SelectionOptions, V2::Page::Components, V2::Page::Force::Bindings, V2::Page::Forces, V2::Page::Sections, V2::Page::Stages, V2::Pages::PageStage::Tasks
Defined Under Namespace
Modules: Doc, DocMutation, Model, Modifiers, Mutation
Constant Summary
Constants included from DoubleModel::Diffable
DoubleModel::Diffable::DIFF_CLASS
Constants included from DoubleModel::Base
Instance Attribute Summary
Attributes included from DoubleModel::Parented
Instance Method Summary collapse
-
#initialize(ini_doc = [], parent: self, key: nil, read_only: false) ⇒ CollectionModel
constructor
A new instance of CollectionModel.
Methods included from Includer
Methods inherited from DoubleModel
Methods included from DoubleModel::Diffable
Constructor Details
#initialize(ini_doc = [], parent: self, key: nil, read_only: false) ⇒ CollectionModel
Returns a new instance of CollectionModel.
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ecoportal/api/common/content/collection_model.rb', line 21 def initialize( ini_doc = [], parent: self, key: nil, read_only: false ) msg = "Undefined base 'klass' or 'new_item' callback for #{self.class}" raise msg unless self.class.klass? ini_doc = to_ini_doc(ini_doc) super end |