Class: DebugJack

Inherits:
Object
  • Object
show all
Defined in:
lib/switchboard/jacks/debug.rb

Class Method Summary collapse

Class Method Details

.connect(switchboard, settings) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/switchboard/jacks/debug.rb', line 4

def self.connect(switchboard, settings)
  switchboard.on_presence do |presence|
    puts "<< #{presence.to_s}".green
  end

  switchboard.on_message do |message|
    puts "<< #{message.to_s}".blue
  end

  switchboard.on_iq do |iq|
    puts "<< #{iq.to_s}".yellow
  end
end