Class: Telemetry::Signal
- Inherits:
-
Object
- Object
- Telemetry::Signal
- Defined in:
- lib/telemetry/signal.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #attribute_map ⇒ Object
-
#initialize ⇒ Signal
constructor
A new instance of Signal.
- #to_json ⇒ Object
Constructor Details
#initialize ⇒ Signal
Returns a new instance of Signal.
24 25 26 27 |
# File 'lib/telemetry/signal.rb', line 24 def initialize @version = '1.0' = ((Time.now.to_f) *1000.0).to_i end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
12 13 14 |
# File 'lib/telemetry/signal.rb', line 12 def class_name @class_name end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
12 13 14 |
# File 'lib/telemetry/signal.rb', line 12 def end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
12 13 14 |
# File 'lib/telemetry/signal.rb', line 12 def type @type end |
#version ⇒ Object (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_map ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/telemetry/signal.rb', line 15 def attribute_map { :'version' => @version, :'timestamp' => , :'type' => @type, :'@class' => @class_name, } end |
#to_json ⇒ Object
29 30 31 |
# File 'lib/telemetry/signal.rb', line 29 def to_json return self.attribute_map.to_json end |