Class: Switchboard::Commands::PubSub::Listen
- Inherits:
-
Switchboard::Command
- Object
- Switchboard::Command
- Switchboard::Commands::PubSub::Listen
- Defined in:
- lib/switchboard/commands/pubsub/listen.rb
Class Method Summary collapse
Methods inherited from Switchboard::Command
description, help, options, to_command, to_command_name
Class Method Details
.run! ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/switchboard/commands/pubsub/listen.rb', line 7 def self.run! switchboard = Switchboard::Client.new switchboard.plug!(PubSubJack) switchboard.on_pubsub_event do |event| puts event.to_s end switchboard.run! end |