lib/alephant/broker/models/response_factory.rb in alephant-broker-0.1.0 vs lib/alephant/broker/models/response_factory.rb in alephant-broker-0.1.1
- old
+ new
@@ -11,19 +11,25 @@
end
def response_from(request)
case request.type
when :asset
- AssetResponse.new(request, @config)
+ AssetResponse.new(request, config)
when :batch
- BatchResponse.new(request, @config).process
+ BatchResponse.new(request, config).process
when :status
response(200)
when :notfound
response(404)
when :error
response(500)
end
+ end
+
+ private
+
+ def config
+ @config
end
def response(status)
Response.new(status)
end