Class: Co2Notify::Status::Base
- Inherits:
-
Object
- Object
- Co2Notify::Status::Base
- Defined in:
- lib/co2-notify/status.rb
Instance Attribute Summary collapse
-
#co2 ⇒ Object
readonly
Returns the value of attribute co2.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#previous ⇒ Object
readonly
Returns the value of attribute previous.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(config, time, previous = nil, co2 = nil) ⇒ Base
constructor
A new instance of Base.
- #type_changed? ⇒ Boolean
Constructor Details
#initialize(config, time, previous = nil, co2 = nil) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/co2-notify/status.rb', line 6 def initialize(config, time, previous = nil, co2 = nil) @config, @co2, @previous, @time = config, co2, previous, time end |
Instance Attribute Details
#co2 ⇒ Object (readonly)
Returns the value of attribute co2.
3 4 5 |
# File 'lib/co2-notify/status.rb', line 3 def co2 @co2 end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/co2-notify/status.rb', line 3 def config @config end |
#previous ⇒ Object (readonly)
Returns the value of attribute previous.
3 4 5 |
# File 'lib/co2-notify/status.rb', line 3 def previous @previous end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
3 4 5 |
# File 'lib/co2-notify/status.rb', line 3 def time @time end |
Instance Method Details
#type_changed? ⇒ Boolean
10 11 12 |
# File 'lib/co2-notify/status.rb', line 10 def type_changed? self.class != previous.class end |