Class: WashoutBuilder::Router
- Inherits:
-
Object
- Object
- WashoutBuilder::Router
- Defined in:
- lib/washout_builder/router.rb
Overview
This class is a Rack middleware used to route SOAP requests to a proper action of a given SOAP controller.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(controller_path) ⇒ Router
constructor
A new instance of Router.
Constructor Details
#initialize(controller_path) ⇒ Router
Returns a new instance of Router.
6 7 8 |
# File 'lib/washout_builder/router.rb', line 6 def initialize(controller_path) @controller_path = controller_path end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 |
# File 'lib/washout_builder/router.rb', line 10 def call(env) env['washout_builder.controller_path'] = @controller_path env["action_dispatch.request.content_type"] = Mime[:html] ::WashoutBuilder::WashoutBuilderController.action(:all).call(env) end |