Sha256: 22598f19867754c84167162a4d11ca1ddd1c4ad8c33818e9edd231afb14a8c0b

Contents?: true

Size: 756 Bytes

Versions: 13

Compression:

Stored size: 756 Bytes

Contents

module MilkMaid
  class FirebaseNotifier < ::MilkMaid::ConsoleNotifier
    attr_accessor :batch_record

    def batch_completed
      super
      batch_record.complete!
    end

    def batch_started(batch_data = {})
      super(batch_data)
      batch_record = ::MilkMaid::FirebaseNotifier::BatchRecord.new(batch_data)
    end

    def log_temperature(temperature)
      super(temperature)
      batch_record.add_event(:temperature, temperature)
    end

    def post_warning(current_temperature, base_temperature)
      super(current_temperature, base_temperature)
      batch_record.add_event(:temperature_warning, current_temperature)
    end

    def temperature_reached
      super
      batch_record.add_event(:threshold_reached)
    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
milk_maid-0.6.1 lib/milk_maid/firebase_notifier.rb
milk_maid-0.5.1 lib/milk_maid/firebase_notifier.rb
milk_maid-0.5.0 lib/milk_maid/firebase_notifier.rb
milk_maid-0.4.0 lib/milk_maid/firebase_notifier.rb
milk_maid-0.3.0 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.8 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.7 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.6 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.5 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.4 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.3 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.2 lib/milk_maid/firebase_notifier.rb
milk_maid-0.2.0 lib/milk_maid/firebase_notifier.rb