Sha256: 2449f6fd27e4c25b1230df7d154195220ff78989f403091912093c6d1b8ff80d
Contents?: true
Size: 547 Bytes
Versions: 27
Compression:
Stored size: 547 Bytes
Contents
require 'artoo/drivers/driver' module Artoo module Drivers # Test driver to count up class Counter < Driver COMMANDS = [:count].freeze # Publishes events to update and alive event topics # with incremental count def start_driver @count = 0 every(interval) do @count += 1 publish(event_topic_name("update"), "count", @count) publish(event_topic_name("count"), @count) end super end def count @count end end end end
Version data entries
27 entries across 27 versions & 1 rubygems