class SSCBot::Clu
Chat Log + User
@author Jonathan Bradley Whited @since 0.1.2
Attributes
bots[R]
chat_log[R]
msg_sender[R]
Public Class Methods
new(chat_log,msg_sender)
click to toggle source
Calls superclass method
# File lib/ssc.bot/clu.rb, line 31 def initialize(chat_log,msg_sender) super() @bots = {} @chat_log = chat_log @msg_sender = msg_sender def_delegators(:@bots,:[]) def_delegator(:@bots,:key?,:bot?) def_delegators(:@chat_log,*(@chat_log.public_methods - public_methods)) def_delegators(:@msg_sender,*(@msg_sender.public_methods - public_methods)) end
Public Instance Methods
add_bot(bot_class)
click to toggle source
# File lib/ssc.bot/clu.rb, line 44 def add_bot(bot_class) bot = @bots[bot_class] if bot.nil? bot = bot_class.new(self) @bots[bot_class] = bot end return bot end