Class: Slack::BlockKit::Composition::ConversationFilter
- Inherits:
-
Object
- Object
- Slack::BlockKit::Composition::ConversationFilter
- Defined in:
- lib/slack/block_kit/composition/conversation_filter.rb
Overview
Provides a way to filter the list of options in a conversations select menu or conversations multi-select menu.
api.slack.com/reference/block-kit/composition-objects#filter_conversations api.slack.com/reference/block-kit/block-elements#conversation_multi_select api.slack.com/reference/block-kit/block-elements#conversation_select
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(only: nil, exclude_external_shared_channels: nil, exclude_bot_users: nil) ⇒ ConversationFilter
constructor
A new instance of ConversationFilter.
Constructor Details
#initialize(only: nil, exclude_external_shared_channels: nil, exclude_bot_users: nil) ⇒ ConversationFilter
Returns a new instance of ConversationFilter.
15 16 17 18 19 20 21 |
# File 'lib/slack/block_kit/composition/conversation_filter.rb', line 15 def initialize(only: nil, exclude_external_shared_channels: nil, exclude_bot_users: nil) @only = only @exclude_external_shared_channels = exclude_external_shared_channels @exclude_bot_users = exclude_bot_users end |
Instance Method Details
#as_json ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/slack/block_kit/composition/conversation_filter.rb', line 23 def as_json(*) { include: @only, exclude_external_shared_channels: @exclude_external_shared_channels, exclude_bot_users: @exclude_bot_users }.compact end |