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 |
.not_found ⇒ Object
24 25 26 |
# File 'lib/alephant/broker/response/factory.rb', line 24 def self.not_found NotFound.new end |
.response_for(request, request_env) ⇒ 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, request_env) case request when Request::Asset Asset.new(request.component, request_env) when Request::Batch Batch.new(request.components, request.batch_id, request_env) when Request::Status Status.new else NotFound.new end end |