Class: EndpointFlux::Request
- Inherits:
-
Object
- Object
- EndpointFlux::Request
- Defined in:
- lib/endpoint_flux/request.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#params ⇒ Object
Returns the value of attribute params.
-
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
-
#scope ⇒ Object
Returns the value of attribute scope.
-
#trace_id ⇒ Object
Returns the value of attribute trace_id.
Instance Method Summary collapse
-
#initialize(headers: {}, remote_ip: '', params: {}, namespace: nil, trace_id: nil) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(headers: {}, remote_ip: '', params: {}, namespace: nil, trace_id: nil) ⇒ Request
Returns a new instance of Request.
5 6 7 8 9 10 11 |
# File 'lib/endpoint_flux/request.rb', line 5 def initialize(headers: {}, remote_ip: '', params: {}, namespace: nil, trace_id: nil) @headers = headers @remote_ip = remote_ip @params = params @namespace = namespace @trace_id = trace_id || SecureRandom.hex(32) end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
17 18 19 |
# File 'lib/endpoint_flux/request.rb', line 17 def endpoint @endpoint end |
#headers ⇒ Object
Returns the value of attribute headers.
14 15 16 |
# File 'lib/endpoint_flux/request.rb', line 14 def headers @headers end |
#namespace ⇒ Object
Returns the value of attribute namespace.
16 17 18 |
# File 'lib/endpoint_flux/request.rb', line 16 def namespace @namespace end |
#params ⇒ Object
Returns the value of attribute params.
13 14 15 |
# File 'lib/endpoint_flux/request.rb', line 13 def params @params end |
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
15 16 17 |
# File 'lib/endpoint_flux/request.rb', line 15 def remote_ip @remote_ip end |
#scope ⇒ Object
Returns the value of attribute scope.
18 19 20 |
# File 'lib/endpoint_flux/request.rb', line 18 def scope @scope end |
#trace_id ⇒ Object
Returns the value of attribute trace_id.
19 20 21 |
# File 'lib/endpoint_flux/request.rb', line 19 def trace_id @trace_id end |