Class: FusionAuth::JSONResponseHandler
- Inherits:
-
Object
- Object
- FusionAuth::JSONResponseHandler
- Defined in:
- lib/fusionauth/rest_client.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #call(body) ⇒ Object
-
#initialize(type) ⇒ JSONResponseHandler
constructor
A new instance of JSONResponseHandler.
Constructor Details
#initialize(type) ⇒ JSONResponseHandler
Returns a new instance of JSONResponseHandler.
391 392 393 |
# File 'lib/fusionauth/rest_client.rb', line 391 def initialize(type) @type = type end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
389 390 391 |
# File 'lib/fusionauth/rest_client.rb', line 389 def type @type end |
Instance Method Details
#call(body) ⇒ Object
395 396 397 |
# File 'lib/fusionauth/rest_client.rb', line 395 def call(body) JSON.parse(body, :object_class => @type) end |