Class: Idnow::JsonResponse

Inherits:
RawResponse show all
Defined in:
lib/idnow/json_response.rb

Instance Attribute Summary collapse

Attributes inherited from RawResponse

#raw

Instance Method Summary collapse

Methods inherited from RawResponse

#errors, #errors?

Constructor Details

#initialize(raw_response) ⇒ JsonResponse

Returns a new instance of JsonResponse.



7
8
9
10
11
# File 'lib/idnow/json_response.rb', line 7

def initialize(raw_response)
  super
  raw_response = '{}' if raw_response == ''
  @data = JSON.parse(raw_response)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/idnow/json_response.rb', line 5

def data
  @data
end