Class: Wsv::Request
- Inherits:
-
Object
- Object
- Wsv::Request
- Defined in:
- lib/wsv/request.rb,
lib/wsv/request/parser.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #head? ⇒ Boolean
-
#initialize(method:, target:, version:, headers:) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(method:, target:, version:, headers:) ⇒ Request
Returns a new instance of Request.
18 19 20 21 22 23 |
# File 'lib/wsv/request.rb', line 18 def initialize(method:, target:, version:, headers:) @method = method @target = target @version = version @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
16 17 18 |
# File 'lib/wsv/request.rb', line 16 def headers @headers end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
16 17 18 |
# File 'lib/wsv/request.rb', line 16 def method @method end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
16 17 18 |
# File 'lib/wsv/request.rb', line 16 def target @target end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
16 17 18 |
# File 'lib/wsv/request.rb', line 16 def version @version end |
Class Method Details
Instance Method Details
#head? ⇒ Boolean
25 26 27 |
# File 'lib/wsv/request.rb', line 25 def head? method == "HEAD" end |