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.



362
363
364
# File 'lib/fusionauth/rest_client.rb', line 362

def initialize(type)
  @type = type
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



360
361
362
# File 'lib/fusionauth/rest_client.rb', line 360

def type
  @type
end

Instance Method Details

#call(body) ⇒ Object



366
367
368
# File 'lib/fusionauth/rest_client.rb', line 366

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