Class: Influx::Flux::AggregateWindow
- Inherits:
-
Object
- Object
- Influx::Flux::AggregateWindow
- Defined in:
- lib/influx/flux/aggregate_window.rb
Instance Method Summary collapse
-
#initialize(every:, fn:) ⇒ AggregateWindow
constructor
A new instance of AggregateWindow.
- #to_flux ⇒ Object
Constructor Details
#initialize(every:, fn:) ⇒ AggregateWindow
Returns a new instance of AggregateWindow.
8 9 10 11 |
# File 'lib/influx/flux/aggregate_window.rb', line 8 def initialize(every:, fn:) @every = every @fn = fn end |
Instance Method Details
#to_flux ⇒ Object
13 14 15 16 17 |
# File 'lib/influx/flux/aggregate_window.rb', line 13 def to_flux <<~FLUX.chomp |> aggregateWindow(every: #{@every}, fn: #{@fn}) FLUX end |