Class: TiltHydrometer::Core
- Inherits:
-
Object
- Object
- TiltHydrometer::Core
- Defined in:
- lib/tilt_hydrometer/core.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Core
constructor
A new instance of Core.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Core
Returns a new instance of Core.
5 6 7 |
# File 'lib/tilt_hydrometer/core.rb', line 5 def initialize( = {}) @options = end |
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tilt_hydrometer/core.rb', line 9 def run scanner.scan do |beacons| beacons.each do |beacon| beacon.extend(TiltHydrometer::BeaconDecorator) beacon.log if beacon.values_out_of_range? LOGGER.debug('values out of range') && next end brewfather&.post(beacon) mqtt&.publish(beacon) end end end |