class ParallelBatchApi::Response

Attributes

body[R]
header[R]
params[R]
status[R]
url[R]

Public Class Methods

new(res, url, params) click to toggle source
# File lib/parallel_batch_api/response.rb, line 5
def initialize(res, url, params)
  @status, @header, @body = res
  @url = url
  @params = params
end

Public Instance Methods

execute() click to toggle source
# File lib/parallel_batch_api/response.rb, line 11
def execute
  base_body = ''
  body.each { |str| base_body << str }
  { status: status, header: header, body: JSON.parse(base_body), url: url, key: key }
end
key() click to toggle source
# File lib/parallel_batch_api/response.rb, line 17
def key
  "#{params[:controller]}##{params[:action]}"
end