Sha256: 8a1ef5e115306298305d538c0d9e299c1c9a3d76959fbcae754e4227ea2a3458

Contents?: true

Size: 539 Bytes

Versions: 2

Compression:

Stored size: 539 Bytes

Contents

module EPayCo
  module Response
    def self.create( response, response_options)
      return response if response_options[:raw]
      return response.body if response_options[:no_response_wrapper]      
      if response_options[:return_object]
        begin
          object_key = response_options[:return_object].is_a?(String) ? response_options[:return_object] : response.body.object
          return response.body[object_key]
        end
      end
      info = response.body.dup
      info.extend( self )
      info
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
epayco-0.0.3 lib/epayco/response.rb
epayco-0.0.2 lib/epayco/response.rb