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


72
73
74
75
76
77
78
# File 'lib/faye-rails/rack_adapter.rb', line 72

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

#incoming(m, c) ⇒ Object


80
81
82
83
# File 'lib/faye-rails/rack_adapter.rb', line 80

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

#outgoing(m, c) ⇒ Object


85
86
87
88
# File 'lib/faye-rails/rack_adapter.rb', line 85

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