Method: Contentful::Management::ResourceBuilder#initialize

Defined in:
lib/contentful/management/resource_builder.rb

#initialize(response, client, resource_mapping = {}, entry_mapping = {}) ⇒ ResourceBuilder

Returns a new instance of ResourceBuilder.


74
75
76
77
78
79
80
81
82
# File 'lib/contentful/management/resource_builder.rb', line 74

def initialize(response, client, resource_mapping = {}, entry_mapping = {})
  @response = response
  @client = client
  @included_resources = {}
  @known_resources = Hash.new { |hash, key| hash[key] = {} }
  @nested_locales = true
  @resource_mapping = default_resource_mapping.merge(resource_mapping)
  @entry_mapping = default_entry_mapping.merge(entry_mapping)
end