Class: Alephant::Broker::Response::Factory
- Inherits:
-
Object
- Object
- Alephant::Broker::Response::Factory
- Defined in:
- lib/alephant/broker/response/factory.rb
Class Method Summary collapse
Class Method Details
.error ⇒ Object
20 21 22 |
# File 'lib/alephant/broker/response/factory.rb', line 20 def self.error ServerError.new end |
.response_for(request) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/alephant/broker/response/factory.rb', line 7 def self.response_for(request) case request when Request::Asset Asset.new(request.component) when Request::Batch Batch.new(request.components, request.batch_id) when Request::Status Status.new else NotFound.new end end |