Exception: JsonapiSpecHelpers::Errors::IncludedOutOfBounds
- Defined in:
- lib/jsonapi_spec_helpers/errors.rb
Instance Method Summary collapse
-
#initialize(type, index, array) ⇒ IncludedOutOfBounds
constructor
A new instance of IncludedOutOfBounds.
- #message ⇒ Object
Constructor Details
#initialize(type, index, array) ⇒ IncludedOutOfBounds
Returns a new instance of IncludedOutOfBounds.
5 6 7 |
# File 'lib/jsonapi_spec_helpers/errors.rb', line 5 def initialize(type, index, array) @type = type; @index = index; @array = array end |
Instance Method Details
#message ⇒ Object
9 10 11 12 13 |
# File 'lib/jsonapi_spec_helpers/errors.rb', line 9 def "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 |