Class: FayeRails::RackAdapter::DebugMessagesExtension

Inherits:
Object
  • Object
show all
Defined in:
lib/faye-rails/rack_adapter.rb

Instance Method Summary collapse

Instance Method Details

#debug(*args) ⇒ Object



81
82
83
84
85
86
87
# File 'lib/faye-rails/rack_adapter.rb', line 81

def debug(*args)
  if defined? ::Rails
    Rails.logger.debug *args
  else
    puts *args
  end
end

#incoming(m, c) ⇒ Object



89
90
91
92
# File 'lib/faye-rails/rack_adapter.rb', line 89

def incoming(m,c)
  debug " **  IN: #{m.inspect}"
  c.call(m)
end

#outgoing(m, c) ⇒ Object



94
95
96
97
# File 'lib/faye-rails/rack_adapter.rb', line 94

def outgoing(m,c)
  debug " ** OUT: #{m.inspect}"
  c.call(m)
end