Class: ActionDispatch::Journey::Router::NullReq
- Inherits:
-
Object
- Object
- ActionDispatch::Journey::Router::NullReq
- Defined in:
- lib/action_dispatch/journey/router.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #[](k) ⇒ Object
-
#initialize(env) ⇒ NullReq
constructor
A new instance of NullReq.
- #ip ⇒ Object
- #path_info ⇒ Object
- #request_method ⇒ Object
Constructor Details
#initialize(env) ⇒ NullReq
Returns a new instance of NullReq.
25 26 27 |
# File 'lib/action_dispatch/journey/router.rb', line 25 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
24 25 26 |
# File 'lib/action_dispatch/journey/router.rb', line 24 def env @env end |
Instance Method Details
#[](k) ⇒ Object
41 42 43 |
# File 'lib/action_dispatch/journey/router.rb', line 41 def [](k) env[k] end |
#ip ⇒ Object
37 38 39 |
# File 'lib/action_dispatch/journey/router.rb', line 37 def ip env['REMOTE_ADDR'] end |
#path_info ⇒ Object
33 34 35 |
# File 'lib/action_dispatch/journey/router.rb', line 33 def path_info env['PATH_INFO'] end |
#request_method ⇒ Object
29 30 31 |
# File 'lib/action_dispatch/journey/router.rb', line 29 def request_method env['REQUEST_METHOD'] end |