Class: Dto::Payload::LogEvents
- Inherits:
-
Object
- Object
- Dto::Payload::LogEvents
- Defined in:
- lib/dto/payload/log_events.rb
Instance Attribute Summary collapse
-
#logPath ⇒ Object
Returns the value of attribute logPath.
-
#logRecords ⇒ Object
Returns the value of attribute logRecords.
-
#logSourceName ⇒ Object
Returns the value of attribute logSourceName.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(metadata, log_source_name, log_path, records) ⇒ LogEvents
constructor
A new instance of LogEvents.
- #to_hash ⇒ Object
Constructor Details
#initialize(metadata, log_source_name, log_path, records) ⇒ LogEvents
Returns a new instance of LogEvents.
9 10 11 12 13 14 |
# File 'lib/dto/payload/log_events.rb', line 9 def initialize(, log_source_name, log_path, records) @metadata = @logSourceName = log_source_name @logPath = log_path @logRecords = Array.new(1, records['message']) end |
Instance Attribute Details
#logPath ⇒ Object
Returns the value of attribute logPath.
7 8 9 |
# File 'lib/dto/payload/log_events.rb', line 7 def logPath @logPath end |
#logRecords ⇒ Object
Returns the value of attribute logRecords.
7 8 9 |
# File 'lib/dto/payload/log_events.rb', line 7 def logRecords @logRecords end |
#logSourceName ⇒ Object
Returns the value of attribute logSourceName.
7 8 9 |
# File 'lib/dto/payload/log_events.rb', line 7 def logSourceName @logSourceName end |
#metadata ⇒ Object
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/dto/payload/log_events.rb', line 7 def @metadata end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/dto/payload/log_events.rb', line 16 def to_hash { metadata: @metadata, logSourceName: @logSourceName, logPath: @logPath, logRecords: @logRecords }.compact end |