Class: Scanii::TraceEvent
- Inherits:
-
Object
- Object
- Scanii::TraceEvent
- Defined in:
- lib/scanii/trace_event.rb
Overview
A single processing event in a TraceResult.
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(timestamp:, message:) ⇒ TraceEvent
constructor
A new instance of TraceEvent.
Constructor Details
#initialize(timestamp:, message:) ⇒ TraceEvent
Returns a new instance of TraceEvent.
8 9 10 11 |
# File 'lib/scanii/trace_event.rb', line 8 def initialize(timestamp:, message:) @timestamp = @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/scanii/trace_event.rb', line 6 def @message end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/scanii/trace_event.rb', line 6 def @timestamp end |
Class Method Details
.from_hash(hash) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/scanii/trace_event.rb', line 13 def self.from_hash(hash) new( timestamp: hash["timestamp"]&.to_s, message: hash["message"]&.to_s ) end |