Class: AjaxChatPluginComm
- Inherits:
-
AjaxChatPlugin
- Object
- AjaxChatPlugin
- AjaxChatPluginComm
- Defined in:
- lib/h2g_ajaxchat-plugin-comm.rb
Instance Method Summary collapse
-
#initialize(ac, settings = {}, debug: false) ⇒ AjaxChatPluginComm
constructor
A new instance of AjaxChatPluginComm.
- #messages ⇒ Object
- #on_newmessage(t, userid, username, msg) ⇒ Object
Constructor Details
#initialize(ac, settings = {}, debug: false) ⇒ AjaxChatPluginComm
Returns a new instance of AjaxChatPluginComm.
13 14 15 16 17 18 |
# File 'lib/h2g_ajaxchat-plugin-comm.rb', line 13 def initialize(ac, settings={}, debug: false) super(ac, settings, debug: debug) @rsc = ac.rws.rsc end |
Instance Method Details
#messages ⇒ Object
20 21 22 23 24 |
# File 'lib/h2g_ajaxchat-plugin-comm.rb', line 20 def () @rsc.chat. end |
#on_newmessage(t, userid, username, msg) ⇒ Object
26 27 28 29 30 |
# File 'lib/h2g_ajaxchat-plugin-comm.rb', line 26 def (t, userid, username, msg) @rsc.sps.notice "chat/%s: %s" % [username, msg] end |