Class: Conductor::Worker::Events::HttpApiRequest
- Inherits:
-
ConductorEvent
- Object
- ConductorEvent
- Conductor::Worker::Events::HttpApiRequest
- Defined in:
- lib/conductor/worker/events/http_events.rb
Instance Attribute Summary collapse
-
#duration_ms ⇒ Object
readonly
Returns the value of attribute duration_ms.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Attributes inherited from ConductorEvent
Instance Method Summary collapse
-
#initialize(method:, uri:, status:, duration_ms:) ⇒ HttpApiRequest
constructor
A new instance of HttpApiRequest.
- #to_h ⇒ Object
Constructor Details
#initialize(method:, uri:, status:, duration_ms:) ⇒ HttpApiRequest
Returns a new instance of HttpApiRequest.
11 12 13 14 15 16 17 |
# File 'lib/conductor/worker/events/http_events.rb', line 11 def initialize(method:, uri:, status:, duration_ms:) super() @method = method.to_s.upcase @uri = uri.to_s @status = status.to_s @duration_ms = duration_ms end |
Instance Attribute Details
#duration_ms ⇒ Object (readonly)
Returns the value of attribute duration_ms.
9 10 11 |
# File 'lib/conductor/worker/events/http_events.rb', line 9 def duration_ms @duration_ms end |
#method ⇒ Object (readonly)
Returns the value of attribute method.
9 10 11 |
# File 'lib/conductor/worker/events/http_events.rb', line 9 def method @method end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/conductor/worker/events/http_events.rb', line 9 def status @status end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
9 10 11 |
# File 'lib/conductor/worker/events/http_events.rb', line 9 def uri @uri end |
Instance Method Details
#to_h ⇒ Object
19 20 21 |
# File 'lib/conductor/worker/events/http_events.rb', line 19 def to_h super.merge(method: @method, uri: @uri, status: @status, duration_ms: @duration_ms) end |