Class: Telemetry::Signal

Inherits:
Object
  • Object
show all
Defined in:
lib/telemetry/signal.rb

Direct Known Subclasses

OpenSignal, Tax::ConnectorIntegrationSignal

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSignal

Returns a new instance of Signal.



24
25
26
27
# File 'lib/telemetry/signal.rb', line 24

def initialize
  @version = '1.0'
  @timestamp = ((Time.now.to_f) *1000.0).to_i
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



12
13
14
# File 'lib/telemetry/signal.rb', line 12

def class_name
  @class_name
end

#timestampObject

Returns the value of attribute timestamp.



12
13
14
# File 'lib/telemetry/signal.rb', line 12

def timestamp
  @timestamp
end

#typeObject (readonly)

Returns the value of attribute type.



12
13
14
# File 'lib/telemetry/signal.rb', line 12

def type
  @type
end

#versionObject (readonly)

Returns the value of attribute version.



12
13
14
# File 'lib/telemetry/signal.rb', line 12

def version
  @version
end

Instance Method Details

#attribute_mapObject



15
16
17
18
19
20
21
22
# File 'lib/telemetry/signal.rb', line 15

def attribute_map
  {
      :'version' => @version,
      :'timestamp' => @timestamp,
      :'type' => @type,
      :'@class' => @class_name,
  }
end

#to_jsonObject



29
30
31
# File 'lib/telemetry/signal.rb', line 29

def to_json
  return self.attribute_map.to_json
end