Class: BotBrain::Chat
- Inherits:
-
Object
- Object
- BotBrain::Chat
- Defined in:
- lib/bot_brain/chat.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
- #add(message) ⇒ Object
-
#initialize(chat_id) ⇒ Chat
constructor
A new instance of Chat.
Constructor Details
#initialize(chat_id) ⇒ Chat
Returns a new instance of Chat.
5 6 7 8 |
# File 'lib/bot_brain/chat.rb', line 5 def initialize(chat_id) @id = chat_id = [] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/bot_brain/chat.rb', line 3 def id @id end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
3 4 5 |
# File 'lib/bot_brain/chat.rb', line 3 def end |
Instance Method Details
#add(message) ⇒ Object
10 11 12 |
# File 'lib/bot_brain/chat.rb', line 10 def add() << end |