Sha256: f72246078510f5c0e74e11b4bc168c7a3ce104305265a61ee29cfbedcfe806b8

Contents?: true

Size: 315 Bytes

Versions: 43

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

module DjiMqttConnect
  module Mixins
    # Provides a conditional that returns false for nil or excessive values (invalid data)
    module TemperatureConditional
      def temperature?
        temperature && !Types::InvalidTemperature.valid?(temperature)
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
dji_mqtt_connect-0.1.25.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.25 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.24.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.24 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.23.3 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.23.2 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.23.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.23 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.22.2 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.22.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.22 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.21 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.20.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.20 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.19.2 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.19.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.19 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.18 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.17.1 lib/dji_mqtt_connect/mixins/temperature_conditional.rb
dji_mqtt_connect-0.1.17 lib/dji_mqtt_connect/mixins/temperature_conditional.rb