Module: Rebot
- Defined in:
- lib/rebot.rb,
lib/rebot/bot.rb,
lib/rebot/cli.rb,
lib/rebot/server.rb,
lib/rebot/message.rb,
lib/rebot/version.rb,
lib/rebot/redis_queue.rb,
lib/rebot/conversation.rb,
lib/rebot/remote_control.rb
Defined Under Namespace
Classes: Bot, CLI, Conversation, Message, RedisQueue, RemoteControl, Server
Constant Summary
collapse
- VERSION =
"0.0.3"
Class Method Summary
collapse
Class Method Details
.conversation(name, &block) ⇒ Object
18
19
20
21
|
# File 'lib/rebot.rb', line 18
def self.conversation(name, &block)
@convos ||= {}
@convos[name.to_sym] = block
end
|
.find_conversation(name) ⇒ Object
23
24
25
26
27
28
29
|
# File 'lib/rebot.rb', line 23
def self.find_conversation(name)
if convo = @convos[name.to_sym]
convo
else
raise "Cannot find conversation: #{name}"
end
end
|
.logger ⇒ Object
14
15
16
|
# File 'lib/rebot.rb', line 14
def self.logger
@logger ||= Logger.new(STDOUT)
end
|