Class: Sqreen::Kit::Signals::Trace

Inherits:
Object
  • Object
show all
Includes:
SignalAttributes
Defined in:
lib/sqreen/kit/signals/trace.rb

Constant Summary

Constants included from DtoHelper

DtoHelper::DO_NOT_CONVERT_TYPES, DtoHelper::RFC_3339_FMT

Instance Attribute Summary collapse

Attributes included from SignalAttributes

#actor, #context, #context_schema, #location, #location_infra, #source, #trigger

Class Method Summary collapse

Instance Method Summary collapse

Methods included from SignalAttributes

#time

Methods included from DtoHelper

#append_to_h_filter, #compact_hash, included, #initialize, #to_json

Instance Attribute Details

#dataArray<Signal>

Returns:



25
26
27
# File 'lib/sqreen/kit/signals/trace.rb', line 25

def data
  @data
end

Class Method Details

.attributes_for_to_h_selfObject



18
19
20
# File 'lib/sqreen/kit/signals/trace.rb', line 18

def self.attributes_for_to_h_self
  [] # we handle data ourselves
end

Instance Method Details

#to_hObject



31
32
33
34
35
# File 'lib/sqreen/kit/signals/trace.rb', line 31

def to_h
  super.merge({
                data: data.map(&:to_h),
              })
end

#typeObject



27
28
29
# File 'lib/sqreen/kit/signals/trace.rb', line 27

def type
  'trace'
end