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.



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

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/idnow/json_response.rb', line 3

def data
  @data
end