class JsonapiSpecHelpers::Errors::IncludedOutOfBounds
Public Class Methods
new(type, index, array)
click to toggle source
# File lib/jsonapi_spec_helpers/errors.rb, line 5 def initialize(type, index, array) @type = type; @index = index; @array = array end
Public Instance Methods
message()
click to toggle source
# File lib/jsonapi_spec_helpers/errors.rb, line 9 def message "You attempted to get an item at index #{@index} of the type '#{@type}' " \ "from the included property of your JSON payload. But it contained " \ "#{@array.length} '#{@type}'" end