Class: ContentfulLite::AssetsArray

Inherits:
BaseArray
  • Object
show all
Defined in:
lib/contentful_lite/assets_array.rb

Instance Attribute Summary

Attributes inherited from BaseArray

#limit, #skip, #total

Instance Method Summary collapse

Methods inherited from BaseArray

#__getobj__, #__setobj__

Constructor Details

#initialize(raw) ⇒ AssetsArray

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of AssetsArray.

Parameters:

  • raw (Hash)

    raw response from Contentful API



5
6
7
8
9
10
# File 'lib/contentful_lite/assets_array.rb', line 5

def initialize(raw)
  super(raw)

  # Create the array of asset objects
  @items.collect! { |item| ContentfulLite::Asset.new(item) }
end