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