Class: Mindee::Parsing::V2::ErrorItem

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/parsing/v2/error_item.rb

Overview

Individual error item.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ ErrorItem

Returns a new instance of ErrorItem.

Parameters:

  • server_response (Hash)

    Raw JSON parsed into a Hash.



14
15
16
17
# File 'lib/mindee/parsing/v2/error_item.rb', line 14

def initialize(server_response)
  @pointer = server_response['pointer']
  @detail = server_response['detail']
end

Instance Attribute Details

#detailString? (readonly)

Returns Explicit information on the issue.

Returns:

  • (String, nil)

    Explicit information on the issue.



11
12
13
# File 'lib/mindee/parsing/v2/error_item.rb', line 11

def detail
  @detail
end

#pointerString? (readonly)

Returns A JSON Pointer to the location of the body property.

Returns:

  • (String, nil)

    A JSON Pointer to the location of the body property.



9
10
11
# File 'lib/mindee/parsing/v2/error_item.rb', line 9

def pointer
  @pointer
end