Module: Sqreen::Kit::Signals::SignalAttributes

Includes:
DtoHelper
Included in:
Signal, Trace
Defined in:
lib/sqreen/kit/signals/signal_attributes.rb

Constant Summary

Constants included from DtoHelper

DtoHelper::DO_NOT_CONVERT_TYPES, DtoHelper::RFC_3339_FMT

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DtoHelper

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

Instance Attribute Details

#actorActor

Returns:



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

def actor
  @actor
end

#contextObject

Returns specified by context schema.

Returns:

  • (Object)

    specified by context schema



33
34
35
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 33

def context
  @context
end

#context_schemaString

Returns:

  • (String)


30
31
32
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 30

def context_schema
  @context_schema
end

#locationLocation

Returns:



36
37
38
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 36

def location
  @location
end

#location_infraLocationInfra

Returns:



39
40
41
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 39

def location_infra
  @location_infra
end

#sourceString

Returns:

  • (String)


42
43
44
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 42

def source
  @source
end

#triggerHash{String=>Object}

Returns:

  • (Hash{String=>Object})


45
46
47
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 45

def trigger
  @trigger
end

Instance Method Details

#timeString

Parameters:

  • (Time)

Returns:

  • (String)


20
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 20

attr_accessor_time :time

#to_hObject



47
48
49
50
51
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 47

def to_h
  {
    type: type,
  }.merge(super())
end

#typeObject

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/sqreen/kit/signals/signal_attributes.rb', line 22

def type
  raise NotImplementedError
end