Class: Journey::Router::NullReq

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

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#envObject (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

#ipObject



36
37
38
# File 'lib/journey/router.rb', line 36

def ip
  env['REMOTE_ADDR']
end

#path_infoObject



32
33
34
# File 'lib/journey/router.rb', line 32

def path_info
  env['PATH_INFO']
end

#request_methodObject



28
29
30
# File 'lib/journey/router.rb', line 28

def request_method
  env['REQUEST_METHOD']
end