Class: Artoo::Drivers::Ping
Overview
Test driver that can be pinged itself
Constant Summary collapse
- COMMANDS =
[:ping].freeze
Instance Attribute Summary
Attributes inherited from Driver
Instance Method Summary collapse
-
#ping ⇒ Object
Publishes events to update event topic when pinged.
- #start_driver ⇒ Object
Methods inherited from Driver
#command, #commands, #connection, #event_topic_name, #initialize, #interval, #known_command?, #method_missing, #pin, #require_interface
Constructor Details
This class inherits a constructor from Artoo::Drivers::Driver
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Artoo::Drivers::Driver
Instance Method Details
#ping ⇒ Object
Publishes events to update event topic when pinged
16 17 18 19 20 21 22 |
# File 'lib/artoo/drivers/ping.rb', line 16 def ping data = 'pong' publish(event_topic_name("update"), "ping", data) publish(event_topic_name("ping"), data) data end |
#start_driver ⇒ Object
10 11 12 |
# File 'lib/artoo/drivers/ping.rb', line 10 def start_driver super end |