Class: Request
- Inherits:
-
Object
- Object
- Request
- Defined in:
- lib/request.rb
Overview
Request class used as instance object of an incoming TCP request to manage that request. Splits the request into it’s method, resource, version, headers and params to be read by the router.
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(input) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(input) ⇒ Request
Returns a new instance of Request.
6 7 8 |
# File 'lib/request.rb', line 6 def initialize(input) variable_definer(input) end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/request.rb', line 3 def headers @headers end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
3 4 5 |
# File 'lib/request.rb', line 3 def method @method end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
3 4 5 |
# File 'lib/request.rb', line 3 def params @params end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
3 4 5 |
# File 'lib/request.rb', line 3 def resource @resource end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/request.rb', line 3 def version @version end |