lib/alephant/broker/models/response_factory.rb in alephant-broker-0.0.3 vs lib/alephant/broker/models/response_factory.rb in alephant-broker-0.1.0
- old
+ new
@@ -1,7 +1,8 @@
require 'alephant/broker/models/response'
require 'alephant/broker/models/response/asset_response'
+require 'alephant/broker/models/response/batch_response'
module Alephant
module Broker
class ResponseFactory
@@ -11,9 +12,11 @@
def response_from(request)
case request.type
when :asset
AssetResponse.new(request, @config)
+ when :batch
+ BatchResponse.new(request, @config).process
when :status
response(200)
when :notfound
response(404)
when :error