Module: Ecoportal::API::Common::Content::CollectionModel::Model::Items
- Extended by:
- Includer
- Defined in:
- lib/ecoportal/api/common/content/collection_model/model/items.rb
Instance Method Summary collapse
-
#_items ⇒ Object
INSTANCE METHODS.
Methods included from Includer
Instance Method Details
#_items ⇒ Object
INSTANCE METHODS
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ecoportal/api/common/content/collection_model/model/items.rb', line 22 def _items return @_items if @_items [].tap do |elements| # necessary in most cases: # @todo check if add condition `unless read_only?` variable_set(:@_items, elements) _doc_items.each do |item_doc| elements << new_item(item_doc) end @_items = elements if read_only? end end |