Class: Dto::Payload::LogEventsJson

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logEvents) ⇒ LogEventsJson

Returns a new instance of LogEventsJson.



11
12
13
# File 'lib/dto/payload/log_events_json.rb', line 11

def initialize(logEvents)
  @LogEvents = Array.new(1, logEvents)
end

Instance Attribute Details

#LogEventsObject

Returns the value of attribute LogEvents.



9
10
11
# File 'lib/dto/payload/log_events_json.rb', line 9

def LogEvents
  @LogEvents
end

Instance Method Details

#to_hashObject



15
16
17
18
19
# File 'lib/dto/payload/log_events_json.rb', line 15

def to_hash
  {
    logEvents: @LogEvents.map(&:to_hash)
  }.compact
end