Class: Linr::Data
- Inherits:
-
Object
- Object
- Linr::Data
- Defined in:
- lib/linr/data.rb
Overview
Describes series send to InfluxDB
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#measurement ⇒ Object
readonly
Returns the value of attribute measurement.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(source) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(source) ⇒ Data
Returns a new instance of Data.
17 18 19 20 21 22 |
# File 'lib/linr/data.rb', line 17 def initialize(source) @measurement = source.fetch(:measurement) @fields = source.fetch(:fields) = source[:tags] = source[:timestamp] end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
13 14 15 |
# File 'lib/linr/data.rb', line 13 def fields @fields end |
#measurement ⇒ Object (readonly)
Returns the value of attribute measurement.
12 13 14 |
# File 'lib/linr/data.rb', line 12 def measurement @measurement end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
14 15 16 |
# File 'lib/linr/data.rb', line 14 def end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
15 16 17 |
# File 'lib/linr/data.rb', line 15 def end |