Class: Giraph::Remote::Response
- Inherits:
-
Hash
- Object
- Hash
- Giraph::Remote::Response
- Defined in:
- lib/giraph/remote/response.rb
Overview
Dummy Hash-wrapper to enable precise ‘instance_of?` checks Allows us to differentiate JSON responses that are coming from remote GraphQL interface vs regular Hash objects including all nested hashes within a response.
Class Method Summary collapse
-
.from_json(raw_json) ⇒ Object
Factory method to encapsulate special parsing logic.
Class Method Details
.from_json(raw_json) ⇒ Object
Factory method to encapsulate special parsing logic
9 10 11 |
# File 'lib/giraph/remote/response.rb', line 9 def self.from_json(raw_json) JSON.parse(raw_json, symbolize_names: true, object_class: self) end |