The Jabber module is the root namespace of the library.
XMPP4R_VERSION | = | '0.4' | XMPP4R Version number. This is the ONLY place where the version number should be specified. This constant is used to determine the version of package tarballs and generated gems. |
returns true if debugging mode is enabled. If you just want to log something if debugging is enabled, use Jabber::debuglog instead.
# File lib/xmpp4r/debuglog.rb, line 31 31: def Jabber::debug 32: @@debug 33: end
Enable/disable debugging mode. When debug mode is enabled, information can be logged using Jabber::debuglog. When debug mode is disabled, calls to Jabber::debuglog are just ignored.
# File lib/xmpp4r/debuglog.rb, line 22 22: def Jabber::debug=(debug) 23: @@debug = debug 24: if @@debug 25: debuglog('Debugging mode enabled.') 26: end 27: end
Outputs a string only if debugging mode is enabled. If the string includes several lines, 4 spaces are added at the beginning of each line but the first one. Time is prepended to the string.
# File lib/xmpp4r/debuglog.rb, line 38 38: def Jabber::debuglog(string) 39: return if not @@debug 40: logger.debug string.chomp.gsub("\n", "\n ") 41: end
# File lib/xmpp4r/debuglog.rb, line 8 8: def Jabber::logger 9: @@logger ||= Logger.new($stderr) 10: end