Class: Barrymore::Message
- Inherits:
-
Object
- Object
- Barrymore::Message
- Defined in:
- lib/barrymore/message.rb
Overview
Barrymore implementation of message. You could use it or provide yours with the same behavior
Instance Attribute Summary collapse
-
#chat ⇒ Object
readonly
Returns the value of attribute chat.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(chat:, text:, data: nil) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(chat:, text:, data: nil) ⇒ Message
Returns a new instance of Message.
7 8 9 10 11 |
# File 'lib/barrymore/message.rb', line 7 def initialize(chat:, text:, data: nil) self.chat = chat.freeze self.text = text.freeze self.data = data.freeze if data end |
Instance Attribute Details
#chat ⇒ Object
Returns the value of attribute chat.
5 6 7 |
# File 'lib/barrymore/message.rb', line 5 def chat @chat end |
#data ⇒ Object
Returns the value of attribute data.
5 6 7 |
# File 'lib/barrymore/message.rb', line 5 def data @data end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/barrymore/message.rb', line 5 def text @text end |