Method: ContentfulLite::AssetsArray#initialize

Defined in:
lib/contentful_lite/assets_array.rb

#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