Class: Schatter::ConversationContext
- Inherits:
-
Object
- Object
- Schatter::ConversationContext
- Includes:
- Command, ShellShock::Context
- Defined in:
- lib/schatter/conversation_context.rb
Instance Method Summary collapse
-
#initialize(conversation) ⇒ ConversationContext
constructor
A new instance of ConversationContext.
Methods included from Command
Constructor Details
#initialize(conversation) ⇒ ConversationContext
Returns a new instance of ConversationContext.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/schatter/conversation_context.rb', line 8 def initialize conversation @prompt = "#{conversation.name} > " @conversation = conversation add_command load_command(:list_messages, conversation), "'" add_command load_command(:create_message, conversation), 'say' add_command load_command(:reply_to_message, conversation, self), 'reply' add_command load_command(:delete_message, conversation), 'delete' add_command load_command(:invite_person, conversation), 'invite' add_command load_command(:list_people, conversation), 'who' end |