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.



376
377
378
# File 'lib/fusionauth/rest_client.rb', line 376

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



374
375
376
# File 'lib/fusionauth/rest_client.rb', line 374

def type
  @type
end

Instance Method Details

#call(body) ⇒ Object



380
381
382
# File 'lib/fusionauth/rest_client.rb', line 380

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