Class: Slack::WebsocketOutgoingMessage
- Inherits:
-
Object
- Object
- Slack::WebsocketOutgoingMessage
- Defined in:
- lib/edi/slack/websocket_outgoing_message.rb
Instance Attribute Summary collapse
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#id ⇒ Object
Returns the value of attribute id.
-
#text ⇒ Object
Returns the value of attribute text.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id:, text:, channel:) ⇒ WebsocketOutgoingMessage
constructor
A new instance of WebsocketOutgoingMessage.
- #to_json ⇒ Object
Constructor Details
#initialize(id:, text:, channel:) ⇒ WebsocketOutgoingMessage
Returns a new instance of WebsocketOutgoingMessage.
5 6 7 8 9 10 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 5 def initialize(id: ,text:, channel:) @text = text @channel = channel @type = "message" @id = id end |
Instance Attribute Details
#channel ⇒ Object
Returns the value of attribute channel.
4 5 6 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 4 def channel @channel end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 4 def id @id end |
#text ⇒ Object
Returns the value of attribute text.
4 5 6 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 4 def text @text end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 4 def type @type end |
Instance Method Details
#to_json ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/edi/slack/websocket_outgoing_message.rb', line 12 def to_json { text: text, channel: channel, type: type, id: id }.to_json end |