Class: Proc::Http::Request
- Inherits:
-
Object
- Object
- Proc::Http::Request
- Defined in:
- lib/proc/http/request.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#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.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
- #callable ⇒ Object
-
#initialize(method:, uri:, params:, headers:, body:) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(method:, uri:, params:, headers:, body:) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 14 |
# File 'lib/proc/http/request.rb', line 8 def initialize(method:, uri:, params:, headers:, body:) @method = method @uri = uri @params = params @headers = headers @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/proc/http/request.rb', line 6 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/proc/http/request.rb', line 6 def headers @headers end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
6 7 8 |
# File 'lib/proc/http/request.rb', line 6 def method @method end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/proc/http/request.rb', line 6 def params @params end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
6 7 8 |
# File 'lib/proc/http/request.rb', line 6 def uri @uri end |
Instance Method Details
#callable ⇒ Object
16 17 18 |
# File 'lib/proc/http/request.rb', line 16 def callable [@method.to_s.upcase, finalize_uri(@uri, @params), @headers, @body] end |