Class: ActionDispatch::Journey::Router::NullReq

Inherits:
Object
  • Object
show all
Defined in:
actionpack/lib/action_dispatch/journey/router.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ NullReq

Returns a new instance of NullReq.



25
26
27
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 25

def initialize(env)
  @env = env
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env



24
25
26
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 24

def env
  @env
end

Instance Method Details

#[](k) ⇒ Object



41
42
43
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 41

def [](k)
  env[k]
end

#ipObject



37
38
39
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 37

def ip
  env['REMOTE_ADDR']
end

#path_infoObject



33
34
35
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 33

def path_info
  env['PATH_INFO']
end

#request_methodObject



29
30
31
# File 'actionpack/lib/action_dispatch/journey/router.rb', line 29

def request_method
  env['REQUEST_METHOD']
end