Class: Dto::Payload::LogEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/dto/payload/log_events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#logPathObject

Returns the value of attribute logPath.



7
8
9
# File 'lib/dto/payload/log_events.rb', line 7

def logPath
  @logPath
end

#logRecordsObject

Returns the value of attribute logRecords.



7
8
9
# File 'lib/dto/payload/log_events.rb', line 7

def logRecords
  @logRecords
end

#logSourceNameObject

Returns the value of attribute logSourceName.



7
8
9
# File 'lib/dto/payload/log_events.rb', line 7

def logSourceName
  @logSourceName
end

#metadataObject

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_hashObject



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