Class: Dolphy::Request
- Inherits:
-
Rack::Request
- Object
- Rack::Request
- Dolphy::Request
- Defined in:
- lib/dolphy/request.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
Instance Method Summary collapse
- #http_method ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
- #path ⇒ Object
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
7 8 9 |
# File 'lib/dolphy/request.rb', line 7 def initialize(env) @env = env end |
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
5 6 7 |
# File 'lib/dolphy/request.rb', line 5 def env @env end |
Instance Method Details
#http_method ⇒ Object
11 12 13 |
# File 'lib/dolphy/request.rb', line 11 def http_method @env['REQUEST_METHOD'].downcase.to_sym end |
#path ⇒ Object
15 16 17 |
# File 'lib/dolphy/request.rb', line 15 def path @env['PATH_INFO'] end |