diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router.rb | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index 5e1fc55d36..26776d2dd8 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -20,37 +20,12 @@ module ActionDispatch # :nodoc: VERSION = '2.0.0' - class NullReq # :nodoc: - attr_reader :env - attr_accessor :path_parameters - def initialize(env) - @env = env - @path_parameters = {} - end - - def request_method - env['REQUEST_METHOD'] - end - - def path_info - env['PATH_INFO'] - end - - def ip - env['REMOTE_ADDR'] - end - - def [](k) - env[k] - end - end - attr_reader :request_class, :formatter attr_accessor :routes def initialize(routes, options) @options = options - @request_class = options[:request_class] || NullReq + @request_class = options[:request_class] @routes = routes end |