Class: TypedForm::JSONResponseHandler

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/typed_form/json_response_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ JSONResponseHandler

Returns a new instance of JSONResponseHandler.



8
9
10
# File 'lib/typed_form/json_response_handler.rb', line 8

def initialize(json)
  @json = json
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



4
5
6
# File 'lib/typed_form/json_response_handler.rb', line 4

def json
  @json
end

Instance Method Details

#parsed_jsonObject



12
13
14
# File 'lib/typed_form/json_response_handler.rb', line 12

def parsed_json
  @_parsed_json ||= JSON.parse(json, object_class: Arendelle)
end