Class: TypedForm::JSONResponseHandler
- Inherits:
-
Object
- Object
- TypedForm::JSONResponseHandler
- Extended by:
- Forwardable
- Defined in:
- lib/typed_form/json_response_handler.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(json) ⇒ JSONResponseHandler
constructor
A new instance of JSONResponseHandler.
- #parsed_json ⇒ Object
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
#json ⇒ Object (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_json ⇒ Object
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 |