Method: CurrentCost::Meter#latest_reading
- Defined in:
- lib/currentcost/meter.rb
#latest_reading ⇒ Object
Get the last Reading received. If no reading has been received yet, returns nil. If you have registered an observer with add_observer(), you will most likely not need this function as the reading will be delivered automatically to your observer’s update() function.
67 68 69 |
# File 'lib/currentcost/meter.rb', line 67 def latest_reading @latest_reading end |