Module: ChatBot::Commandable
- Included in:
- GroupMeMessage
- Defined in:
- lib/chatbot/commandable.rb
Instance Method Summary collapse
Instance Method Details
#body ⇒ Object
11 12 13 |
# File 'lib/chatbot/commandable.rb', line 11 def body return @message.split(' ').drop(1).join(' ') end |
#command ⇒ Object
7 8 9 |
# File 'lib/chatbot/commandable.rb', line 7 def command return @message.split(' ').first end |
#is_command? ⇒ Boolean
3 4 5 |
# File 'lib/chatbot/commandable.rb', line 3 def is_command? return @message[0] == '!' end |