Class: SlackInteractiveClient::Message::Compilation
- Inherits:
-
Object
- Object
- SlackInteractiveClient::Message::Compilation
- Defined in:
- lib/slack_interactive_client/message/compilation.rb
Instance Attribute Summary collapse
-
#csv_data ⇒ Object
readonly
Returns the value of attribute csv_data.
-
#csv_message ⇒ Object
(also: #csv?)
readonly
Returns the value of attribute csv_message.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
Instance Method Summary collapse
- #blocks ⇒ Object
- #channel ⇒ Object
-
#initialize(payload, csv_message = false, csv_data = {}) ⇒ Compilation
constructor
A new instance of Compilation.
Constructor Details
#initialize(payload, csv_message = false, csv_data = {}) ⇒ Compilation
Returns a new instance of Compilation.
7 8 9 10 11 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 7 def initialize(payload, = false, csv_data = {}) @payload = payload = @csv_data = csv_data end |
Instance Attribute Details
#csv_data ⇒ Object (readonly)
Returns the value of attribute csv_data.
6 7 8 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 6 def csv_data @csv_data end |
#csv_message ⇒ Object (readonly) Also known as: csv?
Returns the value of attribute csv_message.
6 7 8 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 6 def end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
6 7 8 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 6 def payload @payload end |
Instance Method Details
#blocks ⇒ Object
13 14 15 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 13 def blocks payload[:blocks]&.to_json end |
#channel ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/slack_interactive_client/message/compilation.rb', line 17 def channel if payload[:channel].is_a?(Array) payload[:channel].first elsif payload[:channel].is_a?(String) payload[:channel] end end |