Class: Journey::Router::NullReq
- Inherits:
-
Object
- Object
- Journey::Router::NullReq
- Defined in:
- lib/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.
24 25 26 |
# File 'lib/journey/router.rb', line 24 def initialize env @env = env end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
23 24 25 |
# File 'lib/journey/router.rb', line 23 def env @env end |
Instance Method Details
#[](k) ⇒ Object
40 |
# File 'lib/journey/router.rb', line 40 def [](k); env[k]; end |
#ip ⇒ Object
36 37 38 |
# File 'lib/journey/router.rb', line 36 def ip env['REMOTE_ADDR'] end |
#path_info ⇒ Object
32 33 34 |
# File 'lib/journey/router.rb', line 32 def path_info env['PATH_INFO'] end |
#request_method ⇒ Object
28 29 30 |
# File 'lib/journey/router.rb', line 28 def request_method env['REQUEST_METHOD'] end |