Class: InfluxDB2::WritePrecision
- Inherits:
-
Object
- Object
- InfluxDB2::WritePrecision
- Defined in:
- lib/influxdb2/client/write_api.rb
Overview
Precision constants.
Constant Summary collapse
- SECOND =
's'.freeze
- MILLISECOND =
'ms'.freeze
- MICROSECOND =
'us'.freeze
- NANOSECOND =
'ns'.freeze
Instance Method Summary collapse
Instance Method Details
#get_from_value(value) ⇒ Object
115 116 117 118 119 120 |
# File 'lib/influxdb2/client/write_api.rb', line 115 def get_from_value(value) constants = WritePrecision.constants.select { |c| WritePrecision.const_get(c) == value } raise "The time precision #{value} is not supported." if constants.empty? value end |