Class: Rail::Request
- Inherits:
-
Object
- Object
- Rail::Request
- Defined in:
- lib/rail/request.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #path ⇒ Object
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
5 6 7 |
# File 'lib/rail/request.rb', line 5 def initialize(env) @env = rewrite(env) end |
Instance Attribute Details
#env ⇒ Object (readonly)
Returns the value of attribute env.
3 4 5 |
# File 'lib/rail/request.rb', line 3 def env @env end |
Instance Method Details
#host ⇒ Object
13 14 15 |
# File 'lib/rail/request.rb', line 13 def host env['HTTP_HOST'] end |
#path ⇒ Object
9 10 11 |
# File 'lib/rail/request.rb', line 9 def path env['PATH_INFO'] end |