Class: ActionController::Routing::RouteSet::Dispatcher
- Inherits:
-
Object
- Object
- ActionController::Routing::RouteSet::Dispatcher
- Defined in:
- lib/rack/mount/mappers/rails_classic.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(options = {}) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
Constructor Details
#initialize(options = {}) ⇒ Dispatcher
Returns a new instance of Dispatcher.
11 12 13 14 15 |
# File 'lib/rack/mount/mappers/rails_classic.rb', line 11 def initialize( = {}) defaults = [:defaults] @glob_param = .delete(:glob) @app = controller(defaults) if bind_controller_const? end |
Instance Method Details
#call(env) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/rack/mount/mappers/rails_classic.rb', line 17 def call(env) params = env[::Rack::Mount::Const::RACK_ROUTING_ARGS] app = @app || controller(params) merge_default_action!(params) split_glob_param!(params) if @glob_param # TODO: Rails response is not finalized by the controller app.call(env).to_a end |