Class: Esplanade::Request::Raw
- Inherits:
-
Object
- Object
- Esplanade::Request::Raw
- Defined in:
- lib/esplanade/request/raw.rb,
lib/esplanade/request/raw/body.rb
Defined Under Namespace
Classes: Body
Instance Method Summary collapse
- #body ⇒ Object
- #content_type ⇒ Object
-
#initialize(env) ⇒ Raw
constructor
A new instance of Raw.
- #method ⇒ Object
- #path ⇒ Object
- #raw_path ⇒ Object
Constructor Details
#initialize(env) ⇒ Raw
Returns a new instance of Raw.
6 7 8 |
# File 'lib/esplanade/request/raw.rb', line 6 def initialize(env) @env = env end |
Instance Method Details
#body ⇒ Object
22 23 24 |
# File 'lib/esplanade/request/raw.rb', line 22 def body @body ||= Body.new(self, @env) end |
#content_type ⇒ Object
26 27 28 |
# File 'lib/esplanade/request/raw.rb', line 26 def content_type @content_type ||= @env['CONTENT_TYPE'].to_s.split(';').first end |
#method ⇒ Object
10 11 12 |
# File 'lib/esplanade/request/raw.rb', line 10 def method @method ||= @env['REQUEST_METHOD'] end |
#path ⇒ Object
14 15 16 |
# File 'lib/esplanade/request/raw.rb', line 14 def path @path ||= @env['PATH_INFO'] end |
#raw_path ⇒ Object
18 19 20 |
# File 'lib/esplanade/request/raw.rb', line 18 def raw_path @raw_path ||= "#{@env['PATH_INFO']}/#{@env['QUERY_STRING']}" end |