Class: ChatBot::GroupMeMessage
- Inherits:
-
Object
- Object
- ChatBot::GroupMeMessage
- Includes:
- Commandable
- Defined in:
- lib/chatbot/groupme_message.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#sender ⇒ Object
readonly
Returns the value of attribute sender.
-
#sender_id ⇒ Object
readonly
Returns the value of attribute sender_id.
Instance Method Summary collapse
-
#initialize(message, sender, sender_id) ⇒ GroupMeMessage
constructor
A new instance of GroupMeMessage.
Methods included from Commandable
Constructor Details
#initialize(message, sender, sender_id) ⇒ GroupMeMessage
Returns a new instance of GroupMeMessage.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/chatbot/groupme_message.rb', line 7 def initialize(, sender, sender_id) begin sender = sender.to_str rescue NoMethodError raise ArgumentError, "expected sender to be string" end @message = || "" @sender = sender @sender_id = sender_id end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/chatbot/groupme_message.rb', line 5 def @message end |
#sender ⇒ Object (readonly)
Returns the value of attribute sender.
5 6 7 |
# File 'lib/chatbot/groupme_message.rb', line 5 def sender @sender end |
#sender_id ⇒ Object (readonly)
Returns the value of attribute sender_id.
5 6 7 |
# File 'lib/chatbot/groupme_message.rb', line 5 def sender_id @sender_id end |