class ContentfulLite::BaseArray

Attributes

limit[R]

The maximum number of resources returned per request

skip[R]

The skip parameter sent to Contentful API for getting this result

total[R]

The total number of items in the result

Public Class Methods

new(raw) click to toggle source

@param raw [Hash] raw response from Contentful API @api private

# File lib/contentful_lite/base_array.rb, line 12
def initialize(raw)
  @total = raw['total']
  @skip = raw['skip']
  @limit = raw['limit']
  @items = raw.fetch('items', [])
end

Public Instance Methods

__getobj__() click to toggle source

@api private

# File lib/contentful_lite/base_array.rb, line 20
def __getobj__
  @items
end
__setobj__(value) click to toggle source

@api private

# File lib/contentful_lite/base_array.rb, line 25
def __setobj__(value)
  @items = value
end