Class: Influx::Flux::Fill
- Inherits:
-
Object
- Object
- Influx::Flux::Fill
- Defined in:
- lib/influx/flux/fill.rb
Instance Method Summary collapse
-
#initialize(use_previous: false, value: nil) ⇒ Fill
constructor
A new instance of Fill.
- #to_flux ⇒ Object
Constructor Details
#initialize(use_previous: false, value: nil) ⇒ Fill
Returns a new instance of Fill.
9 10 11 12 |
# File 'lib/influx/flux/fill.rb', line 9 def initialize(use_previous: false, value: nil) @use_previous = use_previous @value = value end |
Instance Method Details
#to_flux ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/influx/flux/fill.rb', line 14 def to_flux if @use_previous <<~FLUX.chomp |> fill(usePrevious: #{@use_previous}) FLUX else <<~FLUX.chomp |> fill(value: #{@value}) FLUX end end |