class Object

Public Instance Methods

deep(id, link = nil) click to toggle source
# File lib/wcc/contentful/store/rspec_examples/include_param.rb, line 37
def deep(id, link = nil) # rubocop:disable Naming/UncommunicativeMethodParamName
  {
    'sys' => {
      'id' => "deep#{id}",
      'type' => 'Entry',
      'contentType' => { 'sys' => { 'id' => 'deep' } }
    },
    'fields' => {
      'name' => { 'en-US' => "deep#{id}" },
      'subLink' => { 'en-US' => link || make_link_to("shallow#{id}") }
    }
  }
end
shallow(id = nil) click to toggle source
# File lib/wcc/contentful/store/rspec_examples/include_param.rb, line 26
def shallow(id = nil) # rubocop:disable Naming/UncommunicativeMethodParamName
  {
    'sys' => {
      'id' => "shallow#{id}",
      'type' => 'Entry',
      'contentType' => { 'sys' => { 'id' => 'shallow' } }
    },
    'fields' => { 'name' => { 'en-US' => "shallow#{id}" } }
  }
end