Sha256: 432844b5bcf8094f6eea14055882c85d69fb88a76a10212138f9145373a6a58a

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

# -----------------------------------------------------------------------
#  Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved.
# -----------------------------------------------------------------------

require 'json/pure'
require 'App42ResponseBuilder.rb'
require 'imageProcessor/Image.rb'

module App42
  module ImageProcessor

    #
    #
    # ImageProcessResponseBuilder class converts the JSON response retrieved from
    # the server to the value object i.e Image
    #
    #
    class ImageProcessorResponseBuilder < App42ResponseBuilder

      #
      # Converts the response in JSON format to the value object i.e Image
      #
      # @param json
      #      - response in JSON format
      #
      # @return Image object filled with json data
      #
      #
      def buildResponse(json)
        imageJSONObj = getServiceJSONObject("image", json)
        imageObj = Image.new
        imageObj.strResponse=json
        imageObj.isResponseSuccess= isResponseSuccess(json)
        buildObjectFromJSONTree(imageObj, imageJSONObj);
        return imageObj
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
App42_RUBY_SDK-0.8.3 lib/imageProcessor/ImageProcessorResponseBuilder.rb