Class: Co2Notify::Status::Empty

Inherits:
Base
  • Object
show all
Defined in:
lib/co2-notify/status.rb

Instance Attribute Summary

Attributes inherited from Base

#co2, #config, #previous, #time

Instance Method Summary collapse

Methods inherited from Base

#initialize, #type_changed?

Constructor Details

This class inherits a constructor from Co2Notify::Status::Base

Instance Method Details

#changed?(new_status) ⇒ Boolean

Returns:

  • (Boolean)


100
101
102
103
104
105
# File 'lib/co2-notify/status.rb', line 100

def changed?(new_status)
  new_status.is_a?(Empty) ||
    new_status.is_a?(High) ||
    new_status.is_a?(VeryHigh) ||
    new_status.is_a?(Normal)
end

#colorObject



96
97
98
# File 'lib/co2-notify/status.rb', line 96

def color
  :purple
end

#messageObject



92
93
94
# File 'lib/co2-notify/status.rb', line 92

def message
  "#{hc_user}Please check that CO₂ monitor is connected."
end