Class: TicketAbstractorClient::CommunicationData
- Inherits:
-
Object
- Object
- TicketAbstractorClient::CommunicationData
- Defined in:
- lib/ticket_abstractor_client/communication_data.rb
Constant Summary collapse
- BINARY_RESPONSE_TEXT =
'Binary content'.freeze
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#executed_at ⇒ Object
Returns the value of attribute executed_at.
-
#method ⇒ Object
Returns the value of attribute method.
-
#path ⇒ Object
Returns the value of attribute path.
-
#response ⇒ Object
Returns the value of attribute response.
-
#ta_response_time ⇒ Object
Returns the value of attribute ta_response_time.
-
#total_response_time ⇒ Object
Returns the value of attribute total_response_time.
-
#ts_response_time ⇒ Object
Returns the value of attribute ts_response_time.
Instance Method Summary collapse
- #binary_response! ⇒ Object
- #binary_response? ⇒ Boolean
-
#initialize ⇒ CommunicationData
constructor
A new instance of CommunicationData.
- #to_h ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ CommunicationData
Returns a new instance of CommunicationData.
8 9 10 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 8 def initialize @binary_response = false end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def args @args end |
#executed_at ⇒ Object
Returns the value of attribute executed_at.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def executed_at @executed_at end |
#method ⇒ Object
Returns the value of attribute method.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def method @method end |
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def path @path end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def response @response end |
#ta_response_time ⇒ Object
Returns the value of attribute ta_response_time.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def ta_response_time @ta_response_time end |
#total_response_time ⇒ Object
Returns the value of attribute total_response_time.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def total_response_time @total_response_time end |
#ts_response_time ⇒ Object
Returns the value of attribute ts_response_time.
3 4 5 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 3 def ts_response_time @ts_response_time end |
Instance Method Details
#binary_response! ⇒ Object
12 13 14 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 12 def binary_response! @binary_response = true end |
#binary_response? ⇒ Boolean
16 17 18 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 16 def binary_response? @binary_response end |
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 26 def to_h { method: self.method, path: self.path, args: self.args, response: self.response, executed_at: self.executed_at, total_response_time: self.total_response_time, ta_response_time: self.ta_response_time, ts_response_time: self.ts_response_time } end |
#to_json ⇒ Object
39 40 41 |
# File 'lib/ticket_abstractor_client/communication_data.rb', line 39 def to_json self.to_h.to_json end |