Class: Barrymore::Message

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#chatObject

Returns the value of attribute chat.



5
6
7
# File 'lib/barrymore/message.rb', line 5

def chat
  @chat
end

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/barrymore/message.rb', line 5

def data
  @data
end

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/barrymore/message.rb', line 5

def text
  @text
end