Class: FusionAuth::JSONResponseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/fusionauth/rest_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ JSONResponseHandler

Returns a new instance of JSONResponseHandler.



322
323
324
# File 'lib/fusionauth/rest_client.rb', line 322

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



320
321
322
# File 'lib/fusionauth/rest_client.rb', line 320

def type
  @type
end

Instance Method Details

#call(body) ⇒ Object



326
327
328
# File 'lib/fusionauth/rest_client.rb', line 326

def call(body)
  JSON.parse(body, :object_class => @type)
end