Class: LogEventsJson
- Inherits:
-
Object
- Object
- LogEventsJson
- Defined in:
- lib/fluent/dto/logEventsJson.rb
Instance Attribute Summary collapse
-
#LogEvents ⇒ Object
Returns the value of attribute LogEvents.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
-
#initialize(metadata, logEvents) ⇒ LogEventsJson
constructor
A new instance of LogEventsJson.
- #to_hash ⇒ Object
Constructor Details
#initialize(metadata, logEvents) ⇒ LogEventsJson
Returns a new instance of LogEventsJson.
8 9 10 11 12 13 |
# File 'lib/fluent/dto/logEventsJson.rb', line 8 def initialize(,logEvents) if != nil || != 'null' @metadata = end @LogEvents = logEvents end |
Instance Attribute Details
#LogEvents ⇒ Object
Returns the value of attribute LogEvents.
7 8 9 |
# File 'lib/fluent/dto/logEventsJson.rb', line 7 def LogEvents @LogEvents end |
#metadata ⇒ Object
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/fluent/dto/logEventsJson.rb', line 7 def @metadata end |
Instance Method Details
#to_hash ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/fluent/dto/logEventsJson.rb', line 15 def to_hash { metadata: @metadata, logEvents: @LogEvents.map do |le| le.to_hash end }.compact end |